-
Notifications
You must be signed in to change notification settings - Fork 124
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
Create an alias for findObject, like getOrPut #110
Comments
I can see your point about making the naming more intuitive. There are five related functions, and I don't think it makes sense to rename just one. I'm open to renaming all of them (and deprecating the current names) if we can come up with consistent names for all five. The five functions are:
Here's one set of possibilities:
Those names are closer to what the stdlib uses for similar concepts, but I'm not a fan of how verbose they are. They also don't suggest the fact that these function search up the ancestors the way "find" does. I'm open to better suggestions. |
Thanks for being open to renaming these! How about:
|
Yeah, I like those names. |
Thank you for the quick implementation! |
Personally, I have to say that I find the name
findObject
for the variant that is "settingcontext.obj
if one is not found" very counter-intuitive. How about renaming / creating an alias function for it namedgetOrPut
, resembling Kotlin's function for maps?The text was updated successfully, but these errors were encountered: