144
you are viewing a single comment's thread
view the rest of the comments
[-] TehPers@beehaw.org 5 points 2 days ago

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.

[-] YaBoyMax@programming.dev 1 points 1 day ago

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.

[-] Zarobi@aussie.zone 4 points 1 day ago* (last edited 1 day ago)

Why does writing Java code still feel like rolling my own wheelchair uphill both ways with a broken arm then?

[-] TehPers@beehaw.org 2 points 1 day ago

There's more to functional programming than lambdas. Even C++ has closures, but that doesn't make C++ a functional language.

this post was submitted on 02 Dec 2026
144 points (97.4% liked)

Programming

29465 readers
93 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS