archives

« Bugzilla Issues Index

#3984 — "UTF-16Encoding"


The phrase "UTF-16Encoding" is ugly and should be replaced with "UTF-16 Encoding".

Occurrences in:
10.1.1
11.6.1.1
11.6.1.2
11.8.4.3
11.8.6.1
12.2.7.2
21.1.2.2
21.1.3.22
21.2.5.2.2
24.3.1


some people want no spaces in names, other people want spaces...what's an editor to do??


My rule would be: No space if it's used as a programming language identifier; space if it's used as a natural language phrase and such a phrase would contain a space.

"UTF-16 Encoding" seems to be consistently used as a natural language phrase.


And yes, as a natural language phrase the capitalization should also be different: "UTF-16 encoding".


It's actually the name of an abstract operation http://people.mozilla.org/~jorendorff/es6-draft.html#sec-static-semantics-utf-16encoding

The way to make everybody happy is probably to loose the "-"


If you want to treat it as an abstract operation, then you should go all the way:

- Use a verb in the name: UTF16Encode

- Give it an argument list: UTF16Encode(cp)

- Clarify what it returns: A List of code units? A String value? A sequence of code units, a type that's not explicitly defined but used for SVs and TVs?

- Write the algorithm steps that use it so that they actually call an abstract operation. E.g., in 11.6.1.1: “It is a Syntax Error if SV(UnicodeEscapeSequence) is neither the result of UTF16Encode(cp) (10.1.1) for a single Unicode code point cp with the Unicode property “ID_Start” nor "$" or "_".”


removed the dash and added an arguemnt list to its section header just like UNT16Decode

I'm not going to try to further formalize its return result or invocation for Es6

so. I'm deferring the rest of this ticket to ES7