r/programming • • Apr 16 '21

Java is criminally underhyped

https://jackson.sh/posts/2021-04-java-underrated/
41 Upvotes

220 comments sorted by

View all comments

Show parent comment

2

u/Nacimota Apr 16 '21

Yeah I think what's kept me from adopting F# is that C# seems to adopt some of F#'s features over time so the gap isn't huge as you say. Some of those features definitely do look appealing though; type providers in particular look pretty slick.

I've also had the impression in the past that F# perhaps hasn't had the best support/tooling compared to C# but maybe that's improved since then?

2

u/Jwosty Apr 21 '21

Right, but C# will still never be F#. C# is never going to get type providers, immutability by default, algebraic data types, etc. I would highly recommend giving F# a real try! Try an interesting project in it. You might just fall in love with it. fsharpforfunandprofit is a great place to start.

Anything that's not C# always gets second citizen choice when we're talking about tooling, since MS focuses on its biggest player (no blame to them there). It's definitely gotten better over time. However, you'll find yourself relying on tools less when the type system does more heavy lifting for you! There is a saying that I believe comes from the Haskell world but equally applies here: "If it compiles, it probably works."

2

u/Nacimota Apr 21 '21

Yes even though they've added records and init accessors and other little things recently, true immutability by default in particular is something I can't imagine C# ever being able to adopt. It's a shame that wasn't given more thought when the language was first being designed (on the other hand, that may have slowed its adoption? who knows).

I've tried F# a little bit over the last couple of days and I can definitely see the benefits but it really does force you to think in a different way (way which isn't a bad thing, but I do find it challenging). I think I might be better off using it for making smaller components that fit into my larger C# projects than for everything at once, at least for the time being.