I suppose we could change the spec, but
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-language-types-string-type
requires that "The length of a String is the number of elements (i.e.,
16-bit values) within it." - if the number can't be represented, then it
seems that requirement can't be satisfied. I'm sure one can come up with a
counterintuitive reading of the spec, but is that a realistic
interpretation of it?

On Wed, Jan 28, 2015 at 4:37 PM, Domenic Denicola <d...@domenic.me> wrote:

> From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of
> Jordan Harband
>
> > Strings can't possibly have a length larger than Number.MAX_SAFE_INTEGER
> - otherwise, you'd be able to have a string whose length is not a number
> representable in JavaScript.
>
> So? That's a bit inconvenient, but no reason to argue that such a string
> can't exist.
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to