News for hackers. Stuff that matters.
Re:Official proposal for Type Unions in C# by sideeffffect on Thursday August 08, 2024 @07:57AM (#41190533)
> Java is generally fine enough, but it's a little annoying when I have to do whacky workarounds with wrapper classes to get something that would be done in three lines

This is a weird take, given that Java has had ADTs for years

Records https://en.wikipedia.org/wiki/Java_version_history#Java_16

Sealed classes https://en.wikipedia.org/wiki/Java_version_history#Java_17

And pattern matching for almost a year https://en.wikipedia.org/wiki/Java_version_history#Java_21

Otherwise big agree on how delightful to work with F# is.

Re:Official proposal for Type Unions in C# by tombert on Thursday August 08, 2024 @10:00AM (#41191628)
Most of my jobs until recently have been using Java 11, so I didn’t get to use these things.
Re:Official proposal for Type Unions in C# by sideeffffect on Thursday August 08, 2024 @11:18AM (#41192457)
I see. But no hope is lost! You can always lean on Scala. It runs fine on any Java >= 8 and it's great. Unless you intentionally used is badly (but you could say that about any language).