[PATCH] D48991: Docs: Spell C++ lambdas like functions, not variables

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 12:54:17 PDT 2018


dexonsmith created this revision.

I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.

- Use verbs, not nouns.
- Use lowerCamelCase.

Thoughts?


https://reviews.llvm.org/D48991

Files:
  llvm/docs/CodingStandards.rst


Index: llvm/docs/CodingStandards.rst
===================================================================
--- llvm/docs/CodingStandards.rst
+++ llvm/docs/CodingStandards.rst
@@ -1178,6 +1178,9 @@
   command-like function should be imperative.  The name should be camel case,
   and start with a lower case letter (e.g. ``openFile()`` or ``isFoo()``).
 
+* **Function-like objects**, such as C++ lambdas and function pointers, should
+  be written like function names.
+
 * **Enum declarations** (e.g. ``enum Foo {...}``) are types, so they should
   follow the naming conventions for types.  A common use for enums is as a
   discriminator for a union, or an indicator of a subclass.  When an enum is


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48991.154292.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180705/48e7f0a4/attachment.bin>


More information about the llvm-commits mailing list