D style guide [Was: Re: Fatal flaw in...]

bearophile bearophileHUGS at lycos.com
Tue Mar 30 13:18:51 PDT 2010


Don:
> I think that the style guide should be removed. It's rather obsolete and 
> was never completely accepted. It's misleading, and not adding much 
> value any more.

A style guide is important to increase the uniformity of code written in D, I have followed most of it in my dlibs1. One of the main purposes of a module system is to help sharing working units of code. Conventions are important when you want to use modules written by other people. The C/C++ code you can find in the wild is ever different, while other languages (like C# and Python) show the value of more uniformity. Too much freedom in style and form is not positive. D can improve on this too compared to C/C++. Tango team has not followed it and I think they are partially wrong.

So I think the D style guide should be kept, improved, and better enforced, few bits of Phobos2 can be changed to follow the conventions more (for example the name of some templates of D2 can start with an upper case). Once the style guide is updated, Andrei can follow it.

Bye,
bearophile



More information about the Digitalmars-d mailing list