Hacker News new | ask | show | jobs
by mapcars 3021 days ago
>So far as I know, you literally cannot implement a language with mutability on the VM.

Elixir allows reassignment, of course, in the end, it uses different "Erlang" variables, but the language abstracts it.

2 comments

Changing an alias isn't the kind of mutability that would allow high performance, though.
That is not mutability.
It is though. A mutable state layer written on an immutable backend still has all the pitfalls of a native mutable data structure.
Take the context into consideration: this whole thread is about performance and the comment on mutability was speaking of mutability in place, because that matters for performance.
> It is though.

No. That can trivially be inferred from SSA being a thing, mutable bindings can trivially and automatically be converted to immutable ones.