News for hackers. Stuff that matters.
Re:Java’s Cultural Problem by PaulHoule on Monday September 19, 2022 @09:57AM (#32898360)
I'd grant that. I'd say the authentic-to-Java approach to the problem is to static import something like a "map" function

   var result = map(x,x=>x.y)
which is equivalent to

   var result = isNull(x) ? null : x.y
where isNull is static imported from Objects.

An approach which is authentic to some other languages is to consistently used a list with 0 or 1 members instead of optionals.

There are no comments on this comment yet.