Immutable const?

Yad Smood y.s.inside at gmail.com
Tue Nov 8 09:47:13 UTC 2016


The string in V8 is internally immutable, so it may be not that hard to add
this feature?

On Tue, Nov 8, 2016 at 4:14 PM Michał Wadas <michalwadas at gmail.com> wrote:

> Actually it isn't useless - limiting variable reassignment significantly
> increase code readability.
> Immutability is different use case and it's actually impossible to get
> immutability when we consider exotic objects and getters/setters.
>
> On 8 Nov 2016 6:30 a.m., "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
>
> _______________________________________________
> 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/95369d10/attachment.html>


More information about the es-discuss mailing list