- Published on
In Java, mutating a Map inside computeIfAbsent compiles fine and blows up at runtime. In Rust, the same pattern does not compile at all. This is what safe by design actually means.
Reference · Through the layers
Reference · Through the layers
Reference