[llvm-dev] RFC: should we spell lambdas like functions?

Chris Lattner via llvm-dev
Sat, 07 Jul 2018 15:16:16 -0000

> On Jul 7, 2018, at 8:15 AM, Chris Lattner <clattner at nondot.org>
wrote:
>
>
>
>> On Jul 5, 2018, at 12:57 PM, Duncan P. N. Exon Smith via llvm-dev
<llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>
wrote:
>>
>> I argue we should spell C++ lambdas (and other function-like variables)
like functions, not like variables.
>>
>> - Use verbs, not nouns.
>> - Use lowerCamelCase.
>>
>> Here's a patch that implements the change to the coding standards:
>> https://reviews.llvm.org/D48991 <https://reviews.llvm.org/D48991>
> Makes sense to me, I think that all callable values could be named in the
same approach, including function references and std::functions?  Function
pointers are not callable (you need to dereference them) so it is arguable that
they should be capitalized.  It would be nice to include some rationale of why
you’re picking one thing or another in coding standard paragraph.

Err, yeah, of course function pointers are callable.  I meant to say C++ member
pointers :)

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20180707/02d7b180/attachment.html>