RememberMe1370524dI love seeing features from the traditionally functional programming world trickle into mainstream languages. Like, genuinely appreciate. It makes things so much more pleasant, a sort of best-of-both-worlds.
AlmondSauce984524dThe thoughts are welcome, but I can't help but think the trickling down of functional features in Java is a little slapdash. We've essentially got a large chunk of algebraic types in 15 (preview), but no real concept of guaranteed immutability, no currying, no null safety, etc. - all of which I'd class as much more important. Feels a bit like "Brian's fav feature makes it in" rather than a genuine prioritisation based on need.
Also, I wish he'd start talking to and working with the Lombok guys.
Yeah, definitely not glowing praise from my side either. It's just acknowledgement when he's thinking correctly. Typical male privilege for him honestly; condition/gaslight us so routinely with misbehavior that he gets rewarded for modest achievement.
Goetz's core problem is one of megalomania. He rules java with an iron fist and definitely defeats forward motion due to his own opinions and his physical inability to review and research an infinite number of things. For the most part all the enhancements to java for the past n years have been chasing C#.
The flip side is, I can make similar statement about C# in regards to FP as well. There's strict currying in both languages, courtesy of Function/Bifunction/Func<*>, but it is awkward at best.* I appreciate tuples and pattern matching in C#. I can also say they are definitely rushed and missing foundational pieces like union/sum types. In fact I pretty much say that every chance I get.
Post Hejlsberg they've lost a lot of conservatism in the design approach and it's bit them in the ass with what I can only term new-legacy issues that are hard to work around. Some bright side is the records story, though much delayed, seems to be way saner than early drafts. It makes me smile when the enteprisiest devs lament the "new feature bloat" on Twitter because it requires them to exercise muscles between their ears.
What it boils down to is that the OOP languages are finally coming to terms with the compositional weaknesses of OOP.
*Builders are effectively quasi-isomorphisms of strict currying, also, as they will expose functional interfaces for each getter/setter (praise be unto lombok).