Basic coding style

Mike Parker aldacron at gmail.com
Mon Nov 22 06:22:43 PST 2010


On 11/22/2010 9:29 PM, bearophile wrote:
>  From what I'm seeing in D.learn there is a problem in the D community: some people seem irrationally attached to the idea they are free to write D code as they like. I have four or five times tried to explain why coding standards are important for the development of the D community, but it seems not everybody is understanding it.
>
> So I suggest everyone that understands this problem to assume a more rigid and strict attitude toward this problem, because the D2 language community is just starting to develop now, and you don't want it to become the mess the C/C++ world it. I am talking about cases of struct/class names, cases of function names, and few other things.
>
> If I import a module written by another person, I don't want to look in the docs every time to know if the names start with upper case or lower case, and I don't want a module of mine that uses three modules written by other people to look like a patchwork of different styles (because half of it uses an API with a style and half of it with another API and some bits written in a third way).
>
> If you don't act now, adopting less tolerance, this will lead to a mess.
>

People are absolutely free to write D code in any style they please. 
Only if they are contributing to the standard library should they be 
*required* to stick to the specific convention outlined in the docs. 
Otherwise, it's a matter of choice. I certainly don't want anyone 
dictating style to me on any projects I might make publicly available.


More information about the Digitalmars-d mailing list