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

The funniest thing is that to compile Rust, enabling various compiler features (like borrow checker etc), the code has to be transmuted into non-mutable one Single Static Assignment form :V



And in the functional world, Lean 4 achieves language level support for local mutation, early return, etc. in the same way, by converting it into non-mutating code:

https://dl.acm.org/doi/10.1145/3547640


In some ways, CPS as compilation target already went that way.

Sure, ultimately the code mutates values in place, but the specific actions are modeled as pure operations




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: