4 ms·
I hope nobody is counting javascript as a functional programming language. You can however write pretty decent functional code in C#. I ported a 10kloc F# code
by davidgrenier 8y ago
I hope nobody is counting javascript as a functional programming language. You can however write pretty decent functional code in C#.
I ported a 10kloc F# codebase to a very alien-looking functional-style C#. The project was processing several hundred thousand dollars woth of transactions per month and the go-live went flawlessly. I have since left the employer but am aware the code is still in production two years later and the C# devs over there almost never had to reach out for my help.
The long list of limitations C# has over F# is lead by: lack of first-class algebraic datatypes.
- dentemple 8y agoJavascript isn't 100% functional, but the functional paradigm is a founding pillar of the language. Many of JS's best patterns are rooted in taking a "functional-like" approach to coding in it (which is reflected in projects like React).
- alex_hirner 8y agoWhat was the reason for porting to C#?
- davidgrenier 8y agoI attended a few conference/training (POPL/OPLSS) that made me want to pursue more chalenging things in computer science. Among other things my terrible grades in Comp.Sci in the early 2000s required me to do another bachelor's degree to open up masters/phd programs. In other words I was leaving the company. Not a single developers there had bothered (such a bother /s) to learn F# and I wanted to make sure they didn't depend on me. It all worked out perfectly because the math degree turns out to be much more challenging than computer science. Unfortunately developers overestimate the amount of work required to learn a new programming language. In particular ones on the same platform (say F# on .NET for a C# dev). It turns out that learning the libraries takes years but learning a new PL takes but a couple of days of focused efforts.