A random collection of ES4 draft spec surprises and thoughts

Brendan Eich brendan at mozilla.org
Tue May 27 00:04:16 PDT 2008


On May 26, 2008, at 5:57 PM, Mark S. Miller wrote:

> On Mon, May 26, 2008 at 12:01 PM, Brendan Eich  
> <brendan at mozilla.org> wrote:
>> If I recall correctly (and I'm sure someone will set me straight  
>> otherwise),
>> JSON is not compatible with ES3 -- Unicode non-BMP character handling
>> differs. Trying to force a subset relation from JSON to ES4 is not  
>> going to
>> fly if JSON is not a subset of ES3.
>
> That's the first I've heard of that problem. AFAIK, JSON, ES3, ES3.1,
> and ES4 all accept \u surrogate pairs representing a UTF-16 encoding
> of non-BMP characters. Can anyone say more about what the remaining
> problem is here?

Sorry, I was misremembering the problem discussed at

http://wiki.ecmascript.org/doku.php? 
id=proposals:update_unicode&s=incompatible+json

which would make JSON not a subset of ES4.


> The only breakage in the subset relationship that I'm aware of are
>
> * the ES3 stripping of Cf characters, which everyone agrees needs to
> be fixed in ES3.1 and ES4,

Even Microsoft? [1]

> * and the treatment of \u2028 and \u2029 are newline characters rather
> than merely whitespace characters. We're fixing this in ES3.1 and
> proposing that ES4 fix this as well.


That's all fine, or to be debated [2]. But the fact remains: JSON is  
not a subset of ES3 for these reasons. Let's not bend "subset" via  
future tense.

> Are there other problems?

These two are enough.

Why is it important that JSON is a subset of ES-future-anything?

/be

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=368516#c34
[2] http://wiki.ecmascript.org/doku.php? 
id=spec:line_terminator_normalization
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080527/8cc925b2/attachment-0002.html 


More information about the Es4-discuss mailing list