<div dir="ltr"><br><div class="gmail_extra">On Wed, Jun 19, 2013 at 9:46 AM, Andreas Kling <span dir="ltr">&lt;<a href="mailto:akling@apple.com" target="_blank">akling@apple.com</a>&gt;</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 &lt;<a href="mailto:timothy@apple.com" target="_blank">timothy@apple.com</a>&gt; 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&amp; styleResolver()<br></div></blockquote><div dir="auto"><br></div></div></div></div></blockquote><div><br></div><div>This doesn&#39;t make sense since calling styleResolver() again won&#39;t create a new one so it&#39;s also &quot;existing style resolver&quot;.</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&#39;s no reason to decorate a getter that is just a plain getter. Adding an ensureFoo() method shouldn&#39;t make me rename the existing foo() method to fooIfExists().</div>

<div><br></div><div>- E</div></div></div></div>