• 0 Posts
  • 6 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle




  • 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.


  • Started my career as a Java dev, Scala was just starting to take off at the time (circa 2016, so for instance LinkedIn had recently been rewritten from Ruby On Rails to using Scala with Play Framework and a generally stateless paradigm), so I started tinkering with it and Play Framework. When Java started picking up more FP features I started using them in my day job. In addition to all that, I started learning Python and Rust around that time, which influenced how I tended to use those languages as well, leaning more towards a Functional paradigm than OO or imperative. These days my job is primarily in Python, but I constantly use Functional style in my Python code.