Collection.toArray(IntFunction)

stephane.demurget at free.fr stephane.demurget at free.fr
Tue Oct 1 01:02:49 PDT 2013


hi,

I suppose it's not the problem, but would a patch help with the decision?
Or is this only the matter of actually discussing it in the EG?

--Stéphane

----- Mail original -----
> De: "Paul Sandoz" <paul.sandoz at oracle.com>
> Cc: lambda-dev at openjdk.java.net
> Envoyé: Mardi 1 Octobre 2013 09:34:29
> Objet: Re: Collection.toArray(IntFunction)
> 
> 
> On Oct 1, 2013, at 7:57 AM, Peter Levart <peter.levart at gmail.com>
> wrote:
> 
> > On 05/30/2013 10:34 AM, Paul Sandoz wrote:
> >>> >     default <T> T[] toArray(IntFunction<T[]> arrayFactory) {
> >>> >         return toArray(arrayFactory.apply(size()));
> >>> >     }
> >>> >
> >> This was previously discussed in the lambda EG. It was definitely
> >> recognised that the current Collection.toArray methods "stink"
> >> and we did not want to propagate the smell to Stream. We got to
> >> the point of sorting this out on Stream and suggested after that
> >> it may be worth propagating back to Collection but i think it got
> >> lost in the noise of other stuff. I will raise this with the EG.
> >> 
> >> 
> > 
> > Hi,
> > 
> > Is this still on the menu or we're out of luck?
> > 
> 
> Most likely the latter. I am still for it, but we never got full
> consensus and it was small enough that we got distracted by other
> larger things.
> 
> Paul.
> 
> 
> 


More information about the lambda-dev mailing list