Loose end: zip
Brian Goetz
brian.goetz at oracle.com
Mon Jun 10 12:07:41 PDT 2013
Right. There's only so much we can do here; whatever we do will be an
uneasy compromise, and will only get us part of the way there. Each of
the items cited below are already uneasy compromises; it requires taste
and judgement to decide how far to take any one of these -- and when it
comes to matters of taste and judgment, there will be disagreements.
>> Yes, cause i did not want to add Pair :-) so I think this just adds to
>> the argument this function it is not very helpful until the language
>> has tuples.
>
> And stepping back slightly further, ALL of the problems with Optional,
> flatMap, zip, etc ultimately boil down to this. If Java had a distinct
> type system for {tuple, value, struct, packed} types, then the way
> to handle all of these would be obvious. Those of us who believe that
> JVMs will reasonably soon support these resist doing the wrong thing now.
> Others are happy to use the current fake-value-type workarounds, but
> should bear in mind that some usages just won't work in a very defensible
> way. And others won't work in a very FPish way.
>
>
> -Doug
More information about the lambda-libs-spec-experts
mailing list