Deterministic Proposal

Andreas Rossberg rossberg at
Wed Jun 21 16:58:47 UTC 2017

On 21 June 2017 at 18:40, Bradley Meck <bradley.meck at> wrote:

> You probably mean "pure", not "deterministic", which has nothing to do
>> with this. However, JavaScript is far, far too impure for any such
>> annotation to ever make sense or enable any sort of memoization. Consider
>> let i = 0
>> let o = {valueOf() {return i++}}
>> sum(o, 0)
>> sum(o, 0)
> If type coercion was disabled within "pure" functions I am not sure this
> would be a problem.

A new language mode with modified semantics is a whole new dimension that
is far from simple to add to JS. And even then the pure subset of JS would
remain tiny.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list