News for hackers. Stuff that matters.
Re:You can't Rust that by catnaroek on Sunday April 01, 2018 @12:01AM (#16726638)
> But it's clearly not what people mean when they talk about pointers (or references) being mutable.

The semantics of a programming language is what it is, not what you want it to be, unless you explicitly choose a language that allows you to express exactly what you mean.

Re:You can't Rust that by tuukkah on Sunday April 01, 2018 @01:59AM (#16726977)
The semantics of a programming language isn't determined by how you talk about it or even how the language specification talks about it.

The original statement was: "(I program in JavaScript where all values are immutable)" Its meaning depends on the semantics of 'values' and 'immutable'. If by 'values' you only mean primitive values (excluding objects and arrays) or by immutable you only mean immutable identity (excluding mutable state), you're comparing apples to oranges instead of Rust to JavaScript.

Immutable.js and PureScript exists for a reason: in JavaScript, not all values are immutable.

Re:You can't Rust that by catnaroek on Sunday April 01, 2018 @03:01AM (#16727129)
> in JavaScript, not all values are immutable.

Object states are mutable, of course. But they are not values. You can't bind object states to variables. If you use objects as proxies for values that exist in your head but not in in JavaScript's semantics, that's fine, so long as you keep in mind the distinction between what you wish you were using and what you are actually using.