Static methods on Stream and friends
    Tim Peierls 
    tim at peierls.net
       
    Sun Apr 21 11:30:26 PDT 2013
    
    
  
On Sun, Apr 21, 2013 at 2:19 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> It was suggested on lambda-dev that we should rename singleton to simply
> be an overload of "of":
>
>   Stream.of(T)
>   Stream.of(T...)
>
> which seems reasonable.
>
Aren't there ambiguity problems with that pair of signatures? I would have
thought something like this:
Stream.of() // for empty
Stream.of(T) // for singleton
Stream.of(T, T, T...) // for two or more
--tim
    
    
More information about the lambda-libs-spec-observers
mailing list