<div dir="ltr">I wrote that I prefer CamelCase over camelCase for callable objects, but I don't have a strong opinion. If the majority prefers camelCase, I'm happy to update the existing lld's code to conform to the new coding style.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 10, 2018 at 4:25 PM David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 10, 2018 at 4:21 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><br><blockquote type="cite"><div>On Jul. 5, 2018, at 18:12, Bruce Hoult via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_-4648026860447354905m_7140618657944020845Apple-interchange-newline"><div><div dir="ltr" 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;text-decoration:none"><div class="gmail_extra"><br class="m_-4648026860447354905m_7140618657944020845Apple-interchange-newline"><br><div class="gmail_quote">On Thu, Jul 5, 2018 at 5:30 PM, Adrian Prantl via llvm-dev<span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span><span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="m_-4648026860447354905m_7140618657944020845HOEnZb"><div class="m_-4648026860447354905m_7140618657944020845h5"><br><br>> On Jul 5, 2018, at 1:09 PM, Rui Ueyama via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>><span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span><br>>> On Thu, Jul 5, 2018 at 12:57 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>>> I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.<br>>><span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span><br>>> - Use verbs, not nouns.<br>><span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span><br>> I think I agree with this.<br>> <span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span><br>>> - Use lowerCamelCase.<br>><span class="m_-4648026860447354905m_7140618657944020845Apple-converted-space"> </span><br>> In lld we use UpperCamelCase, as they are technically not function names but variable names. Using lowerCamelCase for function pointers feels really weird to me, as they are really variables than functions to me.<br><br></div></div>I also agree that this is weird either way because they are variables when declared and passed around and functions when invoked.<br></blockquote><div><br></div><div>How is this different to function pointers in traditional C?</div><div> </div></div></div></div></div></blockquote><br></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div>It's not different.  The patch proposes to spell C++ lambdas *and other function-like variables* like functions.  Essentially, anything that's callable.</div></div></blockquote><div><br>That seems a bit more awkward/not-clearly-good to me (though I do appreciate that the standard C++ naming convention, for all that it doesn't really differentiate between anything (except macros) by having everything lower_case, does use the same convention between variables and functions so you don't get that disconnect) - ending up with function-named variables that don't behave like functions (get used in assignments, have member functions called on them, compared to nullptr (weak functions notwithstanding), etc).<br><br>Seems more like a narrow kind of hungarian notation to me - to designate that this variable can be called. Which doesn't seem important enough to callout with a separate naming convention.<br><br>But I'm not too fussed about it if others feel strongly.<br><br>- Dave</div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>