A few very minor library issues
kevinb at google.com
Fri Feb 22 08:59:10 PST 2013
On Fri, Feb 22, 2013 at 8:25 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
1. I feel the Stream methods findFirst() and findAny() can really be
>> named just first() and any(). The "find" is just odd and doesn't do
>> enough. Failing that, I'd go for firstElement() / anyElement().
> Agree find is a little weird. I am fine with first() but a little
> squeamish about any(), just because people who have not yet been through
> the parallelism meat grinder already find "findAny" weird ("why is it
> different from findFirst?")
That seems like a concern that's roughly the same whether they have a
common prefix or suffix or not. Though I do see the minor point about a
common prefix grouping them together so that you at least have to ponder
the difference up front...
> Also OK with firstElement() and anyElement().
> 2. I like Stream.substream(), but Stream.sub*S*tream() is undeniably
>> consistent with the collections API (subSet, etc.; sure,
>> String.substring() doesn't follow that, but it's "farther away"). I'm
>> actually on the fence here, because I think "substream" is strictly the
>> /correct/ way to camel-case the word "substream"...
> No strong opinion here. What do people want?
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
More information about the lambda-libs-spec-observers