C# is what you get when someone looks at Java and says “but what if we actually added functional programming elements to it instead of forcing the OOP Kool-Aid on all our users?”
It’s full of random functional features spanning from pattern matching to discriminated union types. It also has a lot of really random stuff that nobody asked for, like LINQ syntax.
On the other hand, Java took a different approach. They were so insistent on forcing OOP on their users that the users made a rich ecosystem of functional languages on the JVM out of spite, like Scala, Kotlin, and Groovy.
These days, Java has been a bit more progressive with their feature set, but C# is far better if you’re looking for functional features.
C# is what you get when someone looks at Java and says “but what if we actually added functional programming elements to it instead of forcing the OOP Kool-Aid on all our users?”
Java has had lambdas and functional APIs for over a decade now, since Java 8.
C# is what you get when someone looks at Java and says “but what if we actually added functional programming elements to it instead of forcing the OOP Kool-Aid on all our users?”
It’s full of random functional features spanning from pattern matching to discriminated union types. It also has a lot of really random stuff that nobody asked for, like LINQ syntax.
On the other hand, Java took a different approach. They were so insistent on forcing OOP on their users that the users made a rich ecosystem of functional languages on the JVM out of spite, like Scala, Kotlin, and Groovy.
These days, Java has been a bit more progressive with their feature set, but C# is far better if you’re looking for functional features.
Java has had lambdas and functional APIs for over a decade now, since Java 8.
Why does writing Java code still feel like rolling my own wheelchair uphill both ways with a broken arm then?
There’s more to functional programming than lambdas. Even C++ has closures, but that doesn’t make C++ a functional language.