Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



> 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, [...]'?


Yes. Unfortunately I wrote the answer on the phone, and completely missed the (way more common in my writing) word replacing the right one :/




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: