A few very minor library issues
joe.bowbeer at gmail.com
Fri Feb 22 08:56:28 PST 2013
I'm fine with the find* methods as they are. It wasn't a problem finding
them and using them in the examples I wrote. The common prefix is a help
for grouping these common methods, and these both return an Option thing,
so the common prefix is also a helpful reminder there.
Just so you know, after we have discussed names several times over several
months and I have already coded the choices into examples, I tend to feel
pretty good about the names and am reluctant to want to change them:-)
I like substream, too.
I'm OK with computeIfAbsent. After years of discussion, it is what it is.
On Feb 22, 2013 8:06 AM, "Kevin Bourrillion" <kevinb at google.com> wrote:
> Just a few little things.
> 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().
> 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"...
> 3. Are we concerned that the name Map.computeIfAbsent() obscures what the
> mutative effect on the map is?
> Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
More information about the lambda-libs-spec-observers