this post was submitted on 22 Jun 2023
31 points (100.0% liked)

Functional Programming

1389 readers
1 users here now

founded 1 year ago
MODERATORS
 

Hello fellow FP-Lemmyites. I'd love to hear stories about what got you interested in FP originally, and how you learned.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

Rust is not a purely FP language, indeed, but I think it's absolutely fine to program almost only FP in it, then you have almost no issues with the borrow-checker. Though since it's a multiparadigm, I obviously decide for each problem the best approach which is not always FP... Often it's just simpler to read imperative code. But I almost always default to fold in Rust anyways.

Though e.g. currying and the likes is certainly more fun in real FP languages (like Haskell).

The more experience I get in all these languages the more I think Rust has found the "perfect" balance of paradigms and readability (well at least to date). But this is obviously also a matter of personal preference... I'm really looking forward that all the boilerplate is reduced when programming with a lot of generic trait-bounds (i.e. more inference where it makes sense), I think this is still an area where Rust could improve (also compile times, like incremental trait solving).