> Is there a good reason not to update the documentation to guarantee an
> 'empty' return? Some potential future performance benefit?
Once you guarantee something you'll have to stick to it -- this is
probably the only reason I
can think of. HPPC is very much driven by selfish needs, so we leave
certain things under- rather
than overspecified.
In this case I think historically we found out the hard way that it
was a better idea to return the default value (rather than something
random). And yes, I think we'll stick to it, so if you feel like
providing a pull request via github, it'd be great.
> I understand that HPPC makes very different decisions from JCL for a lot of
> things, and that is in general a good thing.
Don't know whether it's good, but certainly different. ;) I do
personally feel like HPPC belongs to the world of Java before streams
and we shouldn't try to make it a first-class citizen in streams world
(what Koloboke does, for example). The memory footprint is definitely
one aspect where it matters.
> makes it more difficult to adopt HPPC, especially for less-expert developers.
I'd really not recommend HPPC for less-expert developers... I mean: it
only matters if you crunch a lot of numbers in a repeated way (and it
should be an expert replacement for typical collections which run just
fine in most cases).
> I'm considering adopting HPPC for LensKit (it's so much smaller than
> fastutil, and its APIs fit very well with some of our custom data
> structures), but I want the code to be accessible to newer developers.
Think carefully about what I mentioned above and consider the
consequences, Michael. LensKit sounds great and is definitely a good
match for HPPC, but learning a different collection abstraction may be
a showstopper for people coming to the project. Now, this is a shot in
the foot, but I'm just being honest about how I feel.
Dawid