News for hackers. Stuff that matters.
Re:Functional programming languages should be better at muta... by p_l on Wednesday July 31, 2024 @12:01PM (#41120366)
If you compile your immutable program with LLVM, literally one of the cure steps is transforming it into functional form that does not allow mutations.

This is called Single Static Assignment form and its denial of mutation is crucial to optimization, from common expression removal, to efficient register allocation, and all sorts of control flow analysis.

Re:Functional programming languages should be better at muta... by eru on Thursday August 01, 2024 @12:25AM (#41126148)
> If you compile your immutable program with LLVM, literally one of the cure steps is transforming it into functional form that does not allow mutations.

You probably wanted to write something like 'If you compile your _mutating_ program with LLVM, [...]'?

Re:Functional programming languages should be better at muta... by p_l on Thursday August 01, 2024 @08:17AM (#41128381)
Yes. Unfortunately I wrote the answer on the phone, and completely missed the (way more common in my writing) word replacing the right one :/