I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.
- Use verbs, not nouns.
- Use lowerCamelCase.
Thoughts?
Differential D48991
Docs: Spell C++ lambdas like functions, not variables dexonsmith on Jul 5 2018, 12:54 PM. Authored by
Details
I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.
Thoughts?
Diff Detail Event TimelineComment Actions I've started an RFC on llvm-dev to discuss whether we should make this change: Comment Actions Only lambdas, and not other functors (like std::function, etc)? So we could end up with code like: MyFunctor = myLambda; Though I suppose that's OK - and it's only in the local scope of a function Comment Actions I was just about to commit this (with an example), then I saw your comment which I had missed. The idea would actually be: myFunctor = myLambda; Essentially, objects primarily used as callable things would be spelled like functions. Would you rather carve out lambdas specifically? |