[phobos] Initial Phobos style guide proposal

Andrei Alexandrescu andrei at erdani.com
Thu Mar 31 11:58:41 PDT 2011


On 3/31/11 1:39 PM, Jacob Carlborg wrote:
>> I would love that and think that it would be a _big_ improvement, but there
>> are some folks (Andrei in particular) who seem to really not like code going
>> beyond 80 characters. I do know that there are other Phobos devs who _do_ want
>> longer line lengths though, so maybe we can change this. Where this really
>> gets to be a problem is with lines with several levels of indentation, and
>> trying to restrict the line length (particularly to something short like 80
>> characters) tends to encourage overly short and non-descriptive variable and
>> function names, which is _not_ good.
>
> Can't everyone that likes to keep the horizontal length to 80 characters use word wrapping?

No, and please let's not take this one bit further.

Regarding this:

> I absolutely think that I function should fit within a page of code
> but the way to do that is NOT to write more compact code vertically.
> It's to split the function in several smaller ones, split the classes
> in smaller ones and split the modules smaller ones. That is clearly
> something that Andrei and Walter doesn't seem to understand.

I'd opine that it's a bit assuming. Essentially it says that people who 
don't code the way you like it are incapable of understanding elementary 
modularity.


Thanks,

Andrei


More information about the phobos mailing list