-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define string concatenation #187
Conversation
infra.bs
Outdated
</ol> | ||
|
||
<p class=example id=example-string-concatenate>To serialize a set <var>set</var>, return the | ||
<a for=string>concatenation</a> of <var>set</var> with U+0020 SPACE. |
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.
Here you are conflating a single code point and an entire string. Not sure whether we should be more careful, or just let it slide. (Maybe have a clause somewhere saying that single code points can be interpreted as strings when desired.)
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.
Yeah, I was wondering about that. I was hoping we could just cast between those when needed. Same with sets and lists and such.
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.
Happy to add text for this though.
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.
Seeing the usage sites it seems like a good idea to add, perhaps in a separate PR.
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.
Filed #188. Addressed the remainder.
infra.bs
Outdated
@@ -486,6 +486,24 @@ implementations of just <a>JavaScript strings</a> for performance and memory rea | |||
|
|||
<hr> | |||
|
|||
<p>To <dfn export for=string lt=concatenate|concatenation>concatenate</dfn> a <a for=/>list</a> of |
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 envisioned this being located in the same hr-delimited section as the split operations.
infra.bs
Outdated
@@ -486,6 +486,24 @@ implementations of just <a>JavaScript strings</a> for performance and memory rea | |||
|
|||
<hr> | |||
|
|||
<p>To <dfn export for=string lt=concatenate|concatenation>concatenate</dfn> a <a for=/>list</a> of | |||
<a for=/>strings</a> <var>list</var>, with an optional separator string <var>separator</var>, run |
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 wonder if "using" would be better than "with". "The concatenation of X with Y" almost sounds like the result should be "XY"
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.
Good call.
Fixes #185.
Preview | Diff