Newbie: copy, assignment of class instances

bearophile bearophileHUGS at lycos.com
Thu May 20 16:42:14 PDT 2010


Ellery Newcomer:

> Says the python nazi <g>

I admit that I am more indentation-nazi after using Python for few years, but I was strict on indentation even before hearing of Python :-) (In past I used 2 spaces, for older monitors).

I have not written that html page was written by Walter before seeing me in the D newsgroups :-)

Having a well chosen and uniform style in a language is useful, it helps readability between different programmers of the D community of programmers.

You can also take a look at the quite strict C++ style guide (they forbid tabs, but use 2 spaces).

4 spaces is better than 2 in D today because monitors are wider, and because too many indentations in the code (more than five or six) is probably a sign of badly written code (here I am talking about production code, not toy programs).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list