<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 28, 2017, at 10:58, Sam Weinig <<a href="mailto:weinig@apple.com" class="">weinig@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class="">On Jul 28, 2017, at 10:31 AM, JF Bastien <<a href="mailto:jfbastien@apple.com" class="">jfbastien@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="">On Jul 28, 2017, at 10:29, Sam Weinig <<a href="mailto:weinig@apple.com" class="">weinig@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">For some generic programming, this form can be dramatically shorter:<div class=""><br class=""></div><div class="">e.g. </div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);"><div class="" style="margin: 0px; font-stretch: normal; line-height: normal;"><span class="" style="color: rgb(186, 45, 162);">template</span><<span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>KeyArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>MappedArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>HashArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>KeyTraitsArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>MappedTraitsArg></div><div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(186, 45, 162);">template<span class=""><</span>typename<span class=""><span class="Apple-converted-space"> </span>K,<span class="Apple-converted-space"> </span></span>typename<span class=""><span class="Apple-converted-space"> </span>V></span></div><div class="" style="margin: 0px; font-stretch: normal; line-height: normal;"><span class="" style="color: rgb(120, 73, 42);">ALWAYS_INLINE</span><span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">auto</span><span class="Apple-converted-space"> </span>HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::inlineAdd(K&& key, V&& value) -><span class="Apple-converted-space"> </span><span class="" style="color: rgb(79, 129, 135);">AddResult</span></div><div class="" style="margin: 0px; font-stretch: normal; line-height: normal;">{</div><div class="" style="margin: 0px; font-stretch: normal; line-height: normal;">   <span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">return</span><span class="Apple-converted-space"> </span><span class="" style="color: rgb(79, 129, 135);">m_impl</span>.<span class="" style="color: rgb(186, 45, 162);">template</span><span class="Apple-converted-space"> </span>add<<span class="" style="color: rgb(79, 129, 135);">HashMapTranslator</span><<span class="" style="color: rgb(79, 129, 135);">KeyValuePairTraits</span>,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(79, 129, 135);">HashFunctions</span>>>(<span class="" style="color: rgb(112, 61, 170);">std</span>::forward<K>(key),<span class="Apple-converted-space"> </span><span class="" style="color: rgb(112, 61, 170);">std</span>::forward<V>(value));</div><div class="" style="margin: 0px; font-stretch: normal; line-height: normal;">}</div><div class=""><br class=""></div><div class="">vs.</div></div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);"><span class="" style="color: rgb(186, 45, 162);">template</span><<span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>KeyArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>MappedArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>HashArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>KeyTraitsArg,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename</span><span class="Apple-converted-space"> </span>MappedTraitsArg></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162); background-color: rgb(255, 255, 255);">template<span class=""><</span>typename<span class=""><span class="Apple-converted-space"> </span>K,<span class="Apple-converted-space"> </span></span>typename<span class=""><span class="Apple-converted-space"> </span>V></span></div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);"><span class="" style="color: rgb(120, 73, 42);">ALWAYS_INLINE</span><span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">typename </span>HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::<span class="" style="color: rgb(79, 129, 135);">AddResult </span>HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::inlineAdd(K&& key, V&& value)</div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);">{</div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);">   <span class="Apple-converted-space"> </span><span class="" style="color: rgb(186, 45, 162);">return</span><span class="Apple-converted-space"> </span><span class="" style="color: rgb(79, 129, 135);">m_impl</span>.<span class="" style="color: rgb(186, 45, 162);">template</span><span class="Apple-converted-space"> </span>add<<span class="" style="color: rgb(79, 129, 135);">HashMapTranslator</span><<span class="" style="color: rgb(79, 129, 135);">KeyValuePairTraits</span>,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(79, 129, 135);">HashFunctions</span>>>(<span class="" style="color: rgb(112, 61, 170);">std</span>::forward<K>(key),<span class="Apple-converted-space"> </span><span class="" style="color: rgb(112, 61, 170);">std</span>::forward<V>(value));</div><div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);">}</div><div class=""><br class=""></div></div><div class="">It is also the only format available for lambdas, so people are probably getting used to it.</div><div class=""><br class=""></div><div class="">Not sure it’s worth it to avoid it.</div></div></div></div></blockquote><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Agreed.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">That being said, I’m not volunteering to fix the parser’s handling of lambdas. At that point we should really consider using clang’s AST.</div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I absolutely agree. For this and the style checker, it’s probably time to migrate to clang tooling.</div></div></blockquote><div><br class=""></div><div>I think you misspelled “volunteer”.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">- Sam</div><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class="">- Sam</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 27, 2017, at 11:06 PM, Brady Eidson <<a href="mailto:beidson@apple.com" class="">beidson@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I just noticed this tonight. When a change is made to one of these functions, prepare-ChangeLog doesn't log the functions that changed.<br class=""><br class="">I have a question and a request.<br class=""><br class="">Question:<br class=""><br class="">The functions in question where I noticed this:<br class="">auto WebURLSchemeTask::didComplete(const ResourceError& error) -> ExceptionType<br class=""><br class="">Would normally be written as:<br class="">WebURLSchemeTask::ExceptionType WebURLSchemeTask::didComplete(const ResourceError& error)<br class=""><br class="">Is there some actual value to using this syntax other than… being syntactically different, and being just a little shorter?<br class=""><br class="">Request:<br class=""><br class="">Until we fix prepare-ChangeLog, and unless there is some great advantage to this syntax that I'm not aware of… it's hold off on using it more.<br class=""><br class="">Thanks,<br class="">~Brady<br class="">_______________________________________________<br class="">webkit-dev mailing list<br class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a><br class=""><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" class="">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">webkit-dev mailing list<br class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a><br class=""><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" class="">https://lists.webkit.org/mailman/listinfo/webkit-dev</a></div></blockquote></div></blockquote></div></blockquote></div><br class=""></body></html>