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

  • entropicdrift@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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.