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

It's because you want a tasteful mix of both.

I believe Scala was pretty ahead here by building the language around local mutability with a general preference for immutable APIs, and I think this same philosophy shows up pretty strongly in Rust, aided by the borrow checker that sort of makes this locality compiler-enforced (also, interior mutability)



Worth nothing that idiomatic scala uses constants by default, variables are discouraged and frankly rare.




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

Search: