Rust is doing constant propagation on its internal IR before monomorphisation. This can give faster compiles because LLVM is given less code!
https://blog.rust-lang.org/inside-rust/2019/12/02/const-prop-on-by-default.html
Related Posts
Bril is a cute intermediate language for teaching (think simplified LLVM IR): https://www.cs.cornell.edu/~asampson/blog/bril.html
The idea of providing a standard JSON format to help students write basic passes is really elegant.
I really like pattern matching in Rust, but I find myself using it less and less.
`if let` and `let ... else` require substantially less indentation, and I often use them for Option values.
I don't miss this syntactic sugar in OCaml though. Maybe it's just because OCaml has a 2 space indent, unlike Rust's 4 space indent?
I'm intrigued to see that Google has quantified that new code is generally buggier and less secure than code that has existed in your codebase for longer: https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html