News for hackers. Stuff that matters.
Re:Skip – A programming language to skip the things you have... by vjeux on Wednesday September 26, 2018 @04:36PM (#18080030)
The ! syntax is really cosmetic, we could have gone the let/const route. The bigger aspect is deep immutability. Most languages implement memoize by doing pointer equality and have a notion of shallow immutability. But if someone mutates some value deep down in the object, then they’re fine with it.

The other approach is to do deep copies but it’s very expensive in practice.

Re:Skip – A programming language to skip the things you have... by int_19h on Wednesday September 26, 2018 @11:19PM (#18081923)
The other other approach is to make references explicit in the syntax, so that it is possible to say things like "this is an immutable reference for a mutable object" and "this is a mutable reference for an immutable object". Because sometimes I really do want shallow mutability, and sometimes I want something even more complicated than that (e.g. deep to a certain level and then shallow, or vice versa).

Kinda like C++'s const, except that's actually "readonly" (which is also handy to have!), while what we really need is "immutable". Or rather make immutable the default, and then "readonly" and "mutable" have to be explicit everywhere.