Immutable const?

Reinis Ivanovs dabas at untu.ms
Tue Nov 8 13:57:41 UTC 2016


This idea sounds like having a version of the `const` keyword that also
freezes objects, but that's a far cray from what Immutable.js does, which
is about persistent data and collection methods. Freezing also doesn't work
on things that use mutator methods like Map or Set, so it'd be confusing.

On Tue, Nov 8, 2016 at 7:30 AM, jeremy nagel <jeremymnagel at gmail.com> 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 mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20161108/d9e65fad/attachment.html>


More information about the es-discuss mailing list