DEV Community

loading...

Discussion on: My favorite feature in Rust

Collapse
eriklz profile image
Erik Lundevall Zara

Immutability by default is a great thing, I think. This is one reason I prefer functional languages for a number of tasks (F#, Clojure etc).
The example you provided is a good one and this kind of bug have caused a lot of frustration in some codebases.

Conventions are nice for this, but enforced by the language is much better. It should also be an easy path to take compared to messing with side effects, preferably.

Collapse
winstonpuckett profile image
Winston Puckett Author

Thank you :). Yeah, it was a surprising amount of time to figure it out.

It's interesting how many good ideas are starting to be forced by newer languages - default immutability being one of them. I'm really looking forward to a day when these "good things" are as common as a language being more readable than assembly.