Maximum String length

Jordan Harband ljharb at
Wed Jan 28 16:49:11 PST 2015

I suppose we could change the spec, but
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 at> wrote:

> From: es-discuss [mailto:es-discuss-bounces at] 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list