-
Notifications
You must be signed in to change notification settings - Fork 32
Conversation
spec.emu
Outdated
</h1> | ||
<dl class="header"> | ||
<dt>description</dt> | ||
<dd>If the code unit represents a RegExp punctuator that needs escaping, or ASCII whitespace, it produces the code units for *"\x"* followed by the relevant escape code. If the code unit represents non-ASCII white space, it produces the code units for *"\u"* followed by the relevant escape code. Otherwise, it returns a List containing the original code unit.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<dd>If the code unit represents a RegExp punctuator that needs escaping, or ASCII whitespace, it produces the code units for *"\x"* followed by the relevant escape code. If the code unit represents non-ASCII white space, it produces the code units for *"\u"* followed by the relevant escape code. Otherwise, it returns a List containing the original code unit.</dd> | |
<dd>If _c_ represents a RegExp punctuator that needs escaping or ASCII whitespace, it produces the code points for *"\x"* followed by the relevant escape code. If _c_ represents non-ASCII white space, it produces the code points for *"\u"* followed by the relevant escape code. Otherwise, it returns a singleton List containing _c_.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _c_
replacements seem good, done; but i think the comma is necessary for it to read properly, and what is a "singleton" List vs any other kind of List?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A singleton list has one element. This is to be explicit that it's not any old list that contains c
(and possibly other things) but the list that contains only c
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a really confusing word to use to me; in JS a singleton is when you have a class with a single shared instance. Is that qualifier necessary, given that it already says "a List containing c"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary, I just thought it was a cheap way to be more precise. https://en.wikipedia.org/wiki/Singleton_(mathematics)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how it adds precision, since the prose already explicitly says it has one item in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does it say that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't "Otherwise, it returns a List containing the original code unit" that?
either way i'd like to land this, and i'm happy to have a PR tweaking it further, or we can do it at 262 time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't "Otherwise, it returns a List containing the original code unit" that?
I still don't know where this prose you're referring to is.
[a]
is a list containing a
, and is also a singleton list containing a
. [a, b]
is another list containing a
, but is not a singleton list.
Anyway, it's not important, but for me it seemed like an easy win for precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
Fixes #65