KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am working on a function that returns an object from a container (e.g an Array) by value (e.g by name). If the object doesn't already exist, then a default copy of the object (default constructor) is created and returned. That way, this function ALWAYS returns an object, regardless if the object existed prior to calling the function. Now my question: is there any convention to name such a function so people using my library won't need to read the subjacent code to figure what it does? Something like GetOrCreateThenGet or GetForSure ?
Tags (comma-separated)
Save Edits
Cancel