[phobos] Initial Phobos style guide proposal

Andrei Alexandrescu andrei at erdani.com
Thu Mar 31 11:39:48 PDT 2011


On 3/31/11 12:30 PM, Jonathan M Davis wrote:
> On 2011-03-31 08:21, Jacob Carlborg wrote:
>> class Foo
>> {
>>      int _foo;
>>
>>      int foo () { return _foo; }
>> }
>>
>> But in that case I would still prefer to put the underscore after the name.
>
> The current style used in Phobos is an underscore before the name.

This is the perfect example on why such discussions quickly devolve into 
counterproductive exchanges. There's hardly any objective reason for 
placing an underscore before or after a symbol, so we can go with "I 
like it that way" and "Well I like it the other way" forever. Please - 
let's stop.

I only see two ways out of this:

- We accept that one person decides;
- We agree to not decide on it.

Regarding the number of columns, if that's bound to render people 
unhappy and less likely to contribute, absolutely no problem. Make it a 
loose guideline if at all.


Andrei


More information about the phobos mailing list