Rust is an imperative language based on mutating state; weird to me this isn’t universally acknowledged
Conversation
It’s my fault, I put a phrase in the original docs saying that it supported multiple styles, including functional. I think that’s ~~ moderately true, but also that lots of “functional languages” are significantly imperative (eager, mutating, side-effect-ful). Bit of a spectrum.
2
9
Yea applying paradigms to languages is spectral; I would claim Rust is not particularly more functional than most modern imperative languages, basically all of which have lambdas and map.
3
3
Most things being expressions makes Rust 'feel' a lot more functional than other imperative languages out there with functional features. But I definitely agree with you on the whole - Rust is an imperative language first.
Rust's syntax penalizes you pretty hard readability wise if you try to overuse the functional stuff, so I end up having a mix of functional and imperative where it makes sense. Beginners always want to overuse combinators though! 😂
1


