archives

« Bugzilla Issues Index

#4153 — 10.1.2 + 6.1.4: "UTF16Decode"


{1}
In 10.1.2 "Static Semantics: UTF16Decode( lead, trail )"...

Because the operation only decodes a surrogate pair, it should maybe be renamed to 'UTF16DecodeSurrogatePair'. (Or 'DecodeUTF16SurrogatePair' to be more grammatical, or just 'DecodeSurrogatePair' because UTF-16 is implied by "Surrogate Pair".)

{2}
Also, there are a few places that could invoke this operation but don't:
6.1.4 / bullet 2
18.2.6.1.1 / step 4.d.iii.5
21.1.3.3 / step 12

---

{3}
In 6.1.4, the bullets should be changed into an abstract operation, and *that* should get the name 'UTF16Decode' (or 'DecodeUTF16').

{4}
This could then be explicitly invoked from:
7.1.3.1
18.2.1.1 / step 3
19.2.1.1.1 / steps 11+13
21.1.3.22 / step 4
21.2.2.2 / step 2.1
21.2.3.2.2 / step 10.a+10.b
24.3.1 / step 3


In ES6 rev36 editor's draft

{2}
6.1.4 added a cross reference to 10.1.2
changed 18.2.6.1.1 and 21.1.3.3 to use UTF16Decoede

Deferring to ES7 consideration of the larger changes suggested


Deferring {3} and {4} makes sense, but {1} renaming UTF16Decode doesn't strike me as a "larger change": in rev35, there's only *one* use of it (21.2.2.10).


(In reply to Michael Dyck from comment #2)
> Deferring {3} and {4} makes sense, but {1} renaming UTF16Decode doesn't
> strike me as a "larger change": in rev35, there's only *one* use of it
> (21.2.2.10).

the current name seems adequate for now. But I might consider changing it in the context of a larger redo. BTW, it is now referenced 4 places.