Skip to content

Conversation

rossberg
Copy link
Member

Addresses @lukewagner's comments on #725, #726, and #727, plus his suggestion for back-porting a minor refactoring of the elements grammar (analogously applied to data segments).

Likewise, the |CRETURN| field may be omitted when it is |NORETURN|.

* :math:`C,\K{field}\,A^\ast` denotes the same context as :math:`C` but with the elements :math:`A^\ast` prepended to its :math:`\K{field}` component sequence.
* The notation :math:`\K{field}\,A^\ast, C` denotes the same context as :math:`C` but with the elements :math:`A^\ast` prepended to its :math:`\K{field}` component sequence.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a rendered link I could see? Naively, it looks like it would read labels A, C which is different (and more confusing, imho) than the C.A labels or A C.labels I was expecting. Actually, what about parens: C.(A labels)? You could maybe even hyperlink the ".(" and ") to this particular rule...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main repo, but since all the changes are editorial I took the liberty to upload it to the main GH.io.

I agree that this isn't ideal either, and after a couple of days I like it less. :) But I am somewhat reluctant to introduce extra indexing notation for one single use case. I'm almost tempted to stay with the original version, and just trying to make the note clearer. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looking at the rendered version is, imho, just as confusing as before. The problem with improving the note is that the use sites are still hard to read. I still think both C.(A* labels) and C.labels⟬l⟭ (with hyperlink to the explanation in conventions) would be a lot more readable. As another idea: could we do something with with (which already seems to be in the overall conventions for field update)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I reverted the inverse context extension notation.

Hm, dot notation expresses projection, while extension is a form of injection, i.e., the opposite, so "C.(A* labels)" would be backwards. In general, I think it's preferable to stick as close to standard notation as possible, so that readers with prior exposure to type systems can understand it as is and aren't confused for no reason -- ultimately there is nothing magic going on here, it's just standard de Bruijn indexing.

I would be surprised if introducing multiple different lookup notations would help clarity for most readers. Conceptually, I also think that lookup is the wrong place to tweak: there is nothing noteworthy about the lookup of labels, the crux is in how the index space is organised, i.e., how the bindings are introduced.

Maybe it was the note that was just more confusing than necessary? I gave another shot at trying to make it clearer. I also added extra notes at the extension and lookup sites. Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough and good notes; lgtm!

@rossberg rossberg merged commit 9762124 into master Apr 4, 2018
@rossberg rossberg deleted the review.luke branch April 4, 2018 16:03
@rossberg
Copy link
Member Author

rossberg commented Apr 4, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants