There is a trend towards writing more immutable, functionally pure code and Iβve seen the benefits of this. Does this resonate in any way with you or in how rust is designed?
Yes. Variables and references are immutable by default, and have to be explicitly annotated to be mutable. Also, many features will remind you of functional languages from the ML-family (especially Haskell): algebraic data types, monadic exception handling, typeclasses, associated types.
Yes, it does! But not in the pedantic sense, of course. I still see the value in traditional object-oriented code. Rust is just there to nudge me in the right direction when I attempt to get too clever for my own good.
Overall, what resonates with me the most is the fact that Rust effectively synergizes functional-style code and object-oriented code. It forms a "yin and yang" of sorts between immutability and mutability. This is unlike many languages where the paradigms are set in stone. For instance, Java is notoriously object-oriented while Haskell is confusingly functional. Rust just seems to strike a goodβif not perfectβbalance, you know?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article!
There is a trend towards writing more immutable, functionally pure code and Iβve seen the benefits of this. Does this resonate in any way with you or in how rust is designed?
Yes. Variables and references are immutable by default, and have to be explicitly annotated to be mutable. Also, many features will remind you of functional languages from the ML-family (especially Haskell): algebraic data types, monadic exception handling, typeclasses, associated types.
Yes, it does! But not in the pedantic sense, of course. I still see the value in traditional object-oriented code. Rust is just there to nudge me in the right direction when I attempt to get too clever for my own good.
Overall, what resonates with me the most is the fact that Rust effectively synergizes functional-style code and object-oriented code. It forms a "yin and yang" of sorts between immutability and mutability. This is unlike many languages where the paradigms are set in stone. For instance, Java is
notoriouslyobject-oriented while Haskell isconfusinglyfunctional. Rust just seems to strike a goodβif not perfectβbalance, you know?