-
Notifications
You must be signed in to change notification settings - Fork 14
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
Method name bikeshedding #60
Comments
There was a previous conversation (see #29) about naming for the original design of this proposal. |
In Dart this is called |
I don't like
|
Both current names LGTM - definitely better than was before since they perfectly describe their logic. |
+1 to prefixing with |
I might be inclined to suggest I suppose this would also allow us to rearrange |
I suspect some may interpret |
You can look at it that way, but you can also look at as the |
Just to throw out an extreme alternative, |
The proposal would add two new methods to Map:
getOrInsert(key, default)
- Return value corresponding to the key if present, otherwise insert the specified default value and return that.getOrInsertComputed(key, callback)
- Return value corresponding to the key if present, otherwise call the callback function to determine the default value to insert and return.Those names are placeholders, I'm opening this issue so we can bikeshed the final names to be used.
The text was updated successfully, but these errors were encountered: