Deterministic Proposal

Bradley Meck bradley.meck at
Wed Jun 21 16:40:58 UTC 2017

> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list