Re:Overview of JavaScript ES6 features
by Cthulhu_ on Monday October 24, 2016 @09:46AM
(#12778687)
The only language I've found / used so far that has these (expected) mechanics is Swift, which, when using a `let` for e.g. a list, will make the list itself immutable (in addition to the reference). It's really something that is confusing in every language that has some form of 'final', be it Java (which added immutable list implementations or wrappers to their existing collections), C++, JS, or what-have-you.
[ Parent
| on HN ]
> The only language I've found / used so far that has these (expected) mechanics is Swift
Rust has similar semantics: https://is.gd/hsRjPh versus https://is.gd/ROgzXl
IIRC you can also declare const objects in C++, but constness is more complex and overridden there.