On 03/26/2015 09:46 AM, Radim Vansa wrote:
On 03/26/2015 03:00 PM, Sanne Grinovero wrote:
> On 26 March 2015 at 13:43, William Burns <mudokonman(a)gmail.com> wrote:
>> On Thu, Mar 26, 2015 at 8:50 AM, Sanne Grinovero <sanne(a)infinispan.org>
wrote:
>>> In terms of naming, I'd prefer _getMulti_.
>>> My reasoning is it's nice if has a common prefix with _get_ as that
>>> helps someone exploring the API from an IDE, giving better assistance
>>> to people learning.
>>>
>>> getAll is misleading, as is getMany or get getAllOf as they imply I'm
>>> searching for something based on a pattern but you're expecting the
>>> keys and returning tuples key/value.
>> I can understand your point, however since JCache already defined this
>> as getAll I can't see but using that name.
> Ok that makes it win a bit of points, and at least it starts with _get_.
Was there any discussion regarding this during JSR-107 development? I
wonder why have they chosen such misleading name. Galder?
I don't understand what's misleading about the name getAll.
getAll(keys) -- gets all the entries referenced by those keys.
This is a commonly used naming pattern (i.e. Map.putAll), so -1000 to
making up our own different name.
-Dennis