<div dir="ltr"><br><div class="gmail_extra">On Wed, Jun 19, 2013 at 9:46 AM, Andreas Kling <span dir="ltr"><<a href="mailto:akling@apple.com" target="_blank">akling@apple.com</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im">On Jun 19, 2013, at 6:37 PM, Timothy Hatcher <<a href="mailto:timothy@apple.com" target="_blank">timothy@apple.com</a>> wrote:<br>
</div><div><div class="im"><br><blockquote type="cite"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">What about?<br><br>StyleResolver* existingStyleResolver()<br>
StyleResolver& styleResolver()<br></div></blockquote><div dir="auto"><br></div></div></div></div></blockquote><div><br></div><div>This doesn't make sense since calling styleResolver() again won't create a new one so it's also "existing style resolver".</div>
<div><br></div><div>I rather like the foo() and ensureFoo() methods. foo() is just a plain getter like any other method, the class may start with:</div><div><br></div><div>setFoo(Foo*);</div><div>Foo* foo();</div><div><br>
</div><div>later we want to also allow optionally created when needed so we add:</div><div><br></div><div>Foo* ensureFoo();</div><div><br></div><div>The current naming and methodology makes a lot of sense. fooIfExists() always bugs me because there's no reason to decorate a getter that is just a plain getter. Adding an ensureFoo() method shouldn't make me rename the existing foo() method to fooIfExists().</div>
<div><br></div><div>- E</div></div></div></div>