I would like to resurrect this thread since it would help us a lot for bug 
1453795 to come up to a consensus on when to use bracelets and when to use 
parenthesis. Also I must point out a thing here, that was also mentioned here 
earlier, that there are situations where we cannot use parenthesis. This is 
when we want to initialize a structure that doesn't have a ctor, like:
[1]
struct str {
  int a;
  int b;
};

class Str {
  str s;
  int a;
public:
  Str() : s{0}, a(0) {}
};

Also it would help a lot if we would establish how many, spaces should be 
between the parenthesis or the bracelets, like how do we prefer [1] or [2]

[2]
class Str {
  str s;
  int a;
public:
  Str() : s{ 0 }, a( 0 ) {}
};

I don't have a personal preference here, but right now there are several places 
in our code that combine spaces between parenthesis/bracelets with no spaces.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to