indent style for D

Iain Buclaw ibuclaw at ubuntu.com
Sun Jan 29 15:44:25 PST 2012


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)

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list