<div dir="ltr">Only lambdas, and not other functors (like std::function, etc)?<br><br>So we could end up with code like:<br><br>MyFunctor = myLambda;<br><br>Though I suppose that's OK - and it's only in the local scope of a function & not like any interesting object-like operations (such as assignment) can be done with the lambda as the subject anyway, so it does look a lot like a function... (except you can't assign it to a function pointer - but at least the lambda should be nearby in the code so that's not too confusing)<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 5, 2018 at 12:54 PM Duncan P. N. Exon Smith via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@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">dexonsmith created this revision.<br>
<br>
I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.<br>
<br>
- Use verbs, not nouns.<br>
- Use lowerCamelCase.<br>
<br>
Thoughts?<br>
<br>
<br>
<a href="https://reviews.llvm.org/D48991" rel="noreferrer" target="_blank">https://reviews.llvm.org/D48991</a><br>
<br>
Files:<br>
  llvm/docs/CodingStandards.rst<br>
<br>
<br>
Index: llvm/docs/CodingStandards.rst<br>
===================================================================<br>
--- llvm/docs/CodingStandards.rst<br>
+++ llvm/docs/CodingStandards.rst<br>
@@ -1178,6 +1178,9 @@<br>
   command-like function should be imperative.  The name should be camel case,<br>
   and start with a lower case letter (e.g. ``openFile()`` or ``isFoo()``).<br>
<br>
+* **Function-like objects**, such as C++ lambdas and function pointers, should<br>
+  be written like function names.<br>
+<br>
 * **Enum declarations** (e.g. ``enum Foo {...}``) are types, so they should<br>
   follow the naming conventions for types.  A common use for enums is as a<br>
   discriminator for a union, or an indicator of a subclass.  When an enum is<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>