Tabulators -- a catalog

Remi Forax forax at univ-mlv.fr
Fri Dec 28 07:10:49 PST 2012


On 12/28/2012 03:52 PM, Brian Goetz wrote:
>> You can't create an array of T (C, D) safely, so casting an array of
>> Object to an array of T is maybe acceptable if you control all the
>> access to that array like in collections, but here you export it.
>
> We do control all access during creation.  We instantiate the array, 
> and then we only stick things in it that are statically typed to fit.  
> Once the user gets their hands on it, that's a different story...

to be crystal clear, this throws a CCE at runtime
   String[] strings = Tabulators.partition(s -> s.length() %2 == 0, "", 
(s1, s2) -> s1 + s2).makeAccumulator();

Rémi



More information about the lambda-libs-spec-observers mailing list