-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SharedHashMap interface signatures #14
Comments
|
I change me mind! I'm now familar with ...
let's keep it. |
While not universally in computing, it think it is clear enough. I have http://www.oxforddictionaries.com/definition/english/acquire "acquire [verb] buy or obtain (an asset or object) for oneself." For me, newXxxx => create a new thing always On 5 March 2014 04:59, Ben Cotton notifications@github.com wrote:
|
I was struggling to understand what acquireUsing() does, for me getOrCreate() is much clearer. Rob On 4 Mar 2014, at 19:55, Peter Lawrey notifications@github.com wrote:
|
The problem is that it doesn't strictly create anything either. On 5 March 2014 06:59, Rob Austin notifications@github.com wrote:
|
I thought so too at first, but on second thought ... 'acquire' feels On 03/04/2014 02:59 PM, Rob Austin wrote:
|
Some good java doc will help, Peter if you email me an explanation, I’ll add it to the code. Rob On 4 Mar 2014, at 20:08, Ben Cotton notifications@github.com wrote:
|
What you could do is treat remove(K, V) as replace(K,V, null) where the On 5 March 2014 07:07, Peter Lawrey peter.lawrey@gmail.com wrote:
|
Do you think it makes sense to have a replaceReturnsNull(true) flag? On 5 March 2014 10:00, Peter Lawrey peter.lawrey@gmail.com wrote:
|
Ok Sent from my iPad
|
Could you do a review of the methods implemented by AbstractMap to see On 5 March 2014 10:01, Peter Lawrey peter.lawrey@gmail.com wrote:
|
No - as before you do the replace you have to read() to see if a value exists so you do the read anyway. Sent from my iPad
|
Sure - I'll raise some Jira's. Sent from my iPad
|
Just for the record, acquireUsing, doesn't create any objects or use any On 5 March 2014 07:07, Peter Lawrey peter.lawrey@gmail.com wrote:
|
Absolutely. I can see it being empowering .... Sent from my iPhone
|
These methods although similar, are not identical, I will refactor out the commonalities though Sent from my iPad
|
Refactoring is a nice to have for the alpha release, we should go back and On 5 March 2014 10:10, Rob Austin notifications@github.com wrote:
|
Ok - I'll focus on more important tasks for the moment. Sent from my iPad
|
Don't forget about IDE autocomplete. If I forget |
I agree On 5 Mar 2014, at 04:30, Roman Leventov notifications@github.com wrote:
|
getUsing will always reuse, not "get OR reuse". acquireUsing will also On 5 March 2014 17:59, Rob Austin notifications@github.com wrote:
|
|
We also initially felt awkward with the choice "acquireUsing" ... but On 3/5/2014 6:21 AM, Peter Lawrey wrote:
|
OK, you convinced me. |
get() creates an object. acquireUsing(key, non-null) and getUsing(key, non-null) never create an I think it would be confusing to put "Create" on the method which doesn't On 5 March 2014 22:26, Roman Leventov notifications@github.com wrote:
|
Do you think it might be a little clearer if the
signature was changed to
or possibly
?
Keeping the current signature is fine, of course, I'm just saying for ( simple minded ) me the last one makes it easier to remember which signature can't return NULL. ;-)
The text was updated successfully, but these errors were encountered: