[webkit-dev] For your consideration: Naming scheme for fooIfExists/ensureFoo
barraclough at apple.com
Wed Jun 19 00:13:25 PDT 2013
I find ‘requireStyleResolver()’ a little confusing. My first expectation is often that a method is an imperative command on the receiver, so I first read 'requireStyleResolver()’ as mandating that the document now requires a StyleResolver, rather than referring to the need of the caller.
In a previous codebase I’ve worked on we used ‘acquire’ as a term of art for lazy creation (as a synonym for get, with an inherent connotation that doing so may nontrivial).
On Jun 18, 2013, at 7:11 PM, Darin Adler <darin at apple.com> wrote:
> On Jun 18, 2013, at 7:05 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>> Why don't we call it requireStyleResolver() instead?
> I’m warming to this idea. Maybe we can use “require” as a term of art, analogous to the way we use “create”, to mean “create if not already created”.
> -- Darin
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev