Immutable const?

Yad Smood y.s.inside at
Tue Nov 8 07:58:48 UTC 2016

I think `final` is a bit different from `immutable`. When you use `final`
(Java) it means you can only set it once. But when you use `immutable` it
means every time when you set it, it creates a new object.
Since `let` (like Haskell) is already reserved by JS. How about `def` or
directly use `immutable`?

On Tue, Nov 8, 2016 at 1:30 PM jeremy nagel <jeremymnagel at> wrote:

> Hi,
> was just chatting to colleagues about the utility of *const*. The fact
> that it doesn't actually lead to immutable objects or arrays seems to make
> it a bit toothless and misleading. Are there any proposals to have an
> immutable version of const? I know you could use ImmutableJS but it would
> be nice to have this part of the language.
> Perhaps the keyword could be *final*.
> cheers,
> Jeremy
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list