[webkit-dev] For your consideration: Naming scheme for fooIfExists/ensureFoo
darin at apple.com
Tue Jun 18 18:38:30 PDT 2013
Lets bike shed!
For some time, functions with names like fooIfExists and ensureFoo have been bothering me. I find both names kind of opaque and unpleasant. Here’s an example:
What do you think of these names instead?
I like them better. Note also that I think the requiredStyleResolver function should return a reference so nobody is tempted to do null checks. It seems like the C++ community likes the name optional for this concept; isn’t there some kind of std::optional template?
More information about the webkit-dev