On 28 January 2015 at 13:14, Claude Pache <claude.pa...@gmail.com> wrote:

> To me, "finite" is just to be taken in the common mathematical sense of
> the term; in particular you could have theoretically a string of length
> 10^10000. But yes, it would be reasonable to restrict oneself to strings of
> length at most 2^52, so that `string.length` could always return an exact
> answer.
>

To me it would be reasonable to restrict oneself to much shorter strings,
since no existing machine has the memory to represent a string of length
2^52, nor will any in the foreseeable future. ;)

VMs can always run into out-of-memory conditions. In general, there is no
way to predict those. Even strings with less then the hard-coded length
limit might cause you to go OOM. So providing reflection on a constant like
that might do little but giving a false sense of safety.

/Andreas
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to