<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 1, 2013, at 7:31 PM, Brady Eidson &lt;<a href="mailto:beidson@apple.com">beidson@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 1, 2013, at 5:27 PM, Ryosuke Niwa &lt;<a href="mailto:rniwa@webkit.org">rniwa@webkit.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jun 30, 2013 at 9:39 PM, Filip Pizlo<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a href="mailto:fpizlo@apple.com" target="_blank">fpizlo@apple.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div class="im">On Jun 19, 2013, at 9:41 AM, Dan Bernstein &lt;<a href="mailto:mitz@apple.com">mitz@apple.com</a>&gt; wrote:<br><br>&gt;<br>&gt;<br>&gt; On Jun 19, 2013, at 7:37 PM, Timothy Hatcher &lt;<a href="mailto:timothy@apple.com">timothy@apple.com</a>&gt; wrote:<br>&gt;<br>&gt;&gt; What about?<br>&gt;&gt;<br>&gt;&gt; StyleResolver* existingStyleResolver()<br>&gt;&gt; StyleResolver&amp; styleResolver()<br>&gt;<br>&gt; I like it.<br>&gt;<br>&gt;&gt;<br>&gt;&gt; — Timothy Hatcher<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On Jun 19, 2013, at 11:49 AM, Balazs Kelemen &lt;<a href="mailto:kbalazs@webkit.org">kbalazs@webkit.org</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;&gt; For me optional seems very misleading and generally different prefixes suggests that those objects are not the same.<br>&gt;&gt;&gt; Maybe IfExists does not sound nicely but at least it's clear. I would choose to have a pointer version with IfExists and a reference version which is a noun, like:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; StyleResolver* styleResolverIfExists()<br><br></div>I like this more. I like that the use of 'if' in the name alerts me to the fact that the function will return something conditionally.<br><br>By contrast, "existingFoo" only makes sense to me if I'm already aware of the idiom. And although I probably will *become* aware of the idiom it will still nonetheless be one of many idioms that I have to be aware of, so I fear that I'll forget why "Foo" is qualified with "existing". That's why I like "fooIfExists" - its super explicit about what is going on.<br></blockquote><div><br></div><div>I concur. &nbsp;Maybe</div><div><span style="font-family: 'courier new', monospace;">StyleResolver* styleResolverIfExists()</span><br></div><div><div><font face="courier new, monospace">StyleResolver&amp; styleResolver()</font></div><div>?<br></div></div></div></div></div></div></blockquote><div dir="auto"><br></div>I concur with this.</div><div dir="auto"><br></div><div dir="auto">For this entire discussion, this is where I was hoping it was headed.</div></div></blockquote><div><br></div><div>On second and third thought, I do think these are better.</div></div></body></html>