not answering your question yet, but...
On Thu, Sep 7, 2017 at 2:07 PM, Emilio Cobos Álvarez <[email protected]> wrote:
>
> enum class Operation {
> // ..
> };
that should be:
enum class Operation
{
// ...
};
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Control_Structures
simply because only control structure follows the K&R style of having
the brace at the end.
Just like class and function definition, enum aren't control
structure, as such "left brace goes by itself on the second line and
without extra indentation, in general for C++."
>
> void DoBar(Operation aOperation);
>
> I personally think those argument names are mostly noise (the type gives
> you the same information), and C++ allows omitting them.
>
> That would make the signature more concise, like:
>
> void DoBar(Operation);
>
> Which is helpful specially in long signatures.
>
> I don't see anything mentioned in the style guide about this, should it be?
When I don't see anything specific in the style guide, I look at the
long example provided there:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes
argument names are always provided in all those examples. As such, I
assume they are to always be there.
It would also not be very consistent for all the functions that take
POD, where there it is definitely required to make your code
consistent.
My $0.02.
JY
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform