3 ms·
So, I'm just beginning to dip my toe into functional programming and trying to figure out if and when this approach has real-world benefits. But I'm constantly
by FearNotDaniel 8y ago
So, I'm just beginning to dip my toe into functional programming and trying to figure out if and when this approach has real-world benefits. But I'm constantly surprised by the emphasis that articles like this put onto the advantage of having types as one of the reasons for making the paradigm shift to functional. If someone from the Rails world asked me how to get the benefits of a type system in server-side web app code, I would say why not just move over to C#/ASP.NET or any other procedural language that has strong typing built in. That alone is not enough to justify the learning curve, not to mention the business risk of adopting an 'experimental' technology (decades old, yes, but still relatively untested for ordinary enterprisey web applications) and thus have a much smaller talent pool when it comes to hiring.
I get that people coming from Ruby/JS/Python world will go "woo, types!" but you don't need to go functional to get that; I wish more of these articles would explain why the nuances of functional type systems, and other benefits of the functional approach, lead to concrete advantages when it comes to building real systems that do useful work.
- jasim 8y agoThe types in Java/C# etc. are what I'd term as object-oriented type systems. They conflate the notion of class and type; while in Typed Functional languages, they just type data, and also gives you Sum Types and Exhaustive Pattern Matching. This is a very different way of programming from object-oriented type systems. Some more explanation here if you're curious: https://protoship.io/blog/an-invitation-to-reasonml/#the-big-deal-types-around-data-instead-of-classes https://protoship.io/blog/an-invitation-to-reasonml/#the-big...