this post was submitted on 22 Jun 2023
27 points (100.0% liked)
Functional Programming
1398 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
As someone who's been toying with Rust for a few years but hasn't written anything substantial in it yet, I really like the functional features it has. I find the pattern matching to be an incredibly clean way of managing temporary scopes that are only needed to define a single variable.
Likewise I find the restrictions imposed by the compiler to be useful for writing extremely clean, explicit code. One of the bigger issues I find with reading other people's Scala code (for instance) is that syntactic sugar of the language leads to a lot of implicitness, which can lead to a much longer period of parsing the code before it could otherwise be safely modified. With Rust it feels much more like WYSIWYG, and if there's any doubt if you can do something safely in the language, you can just mash compile till you're safely inside the guard rails.
That said, I do agree with the other commenter that it's not primarily an FP language. It is however, a highly productive language to write code in once you get past the initial learning curve, IMO.