indent style for D

deadalnix deadalnix at gmail.com
Sun Jan 29 15:56:12 PST 2012


Le 30/01/2012 00:44, Iain Buclaw a écrit :
> On 29 January 2012 23:30, Matej Nanut<matejnanut at gmail.com>  wrote:
>> I like the look of 8-space indents, but I don't see how I could pull
>> it off if I use object-oriented features. I use 8-space indents if I
>> code C, and it seems to work really well. But when you have a class,
>> and then maybe even an inner class, you practically start with 2
>> levels of indentation, and that's where half your "page" (screen) is
>> blank space!
>>
>> What is a solution to this, apart from using 4-space indentation? To
>> not indent class declarations is kinda one.
>
> The answer to that is that if you need more than 3 levels of
> indentation, you're screwed anyway, and should fix your program.  :o)
>

Well, not to mention that this sentence first apply to C. Because if you 
apply that in some programming languages, you'll be screwed up pretty 
quickly (even in D even if it isn't the worse at this game).


More information about the Digitalmars-d mailing list