D - Code Blocks
- J Anderson (25/25) Jan 16 2004 This just occurred to me.
This just occurred to me.
Right now in D we have 3 ways of doing blocks although they are used for
different things. Parhaps they could be made uniform.
ie
//Block type 1
{ }
export (C) { }
//Block type 2 (a single line block)
export (C)
if ()
//Block type 3
public:
case N:
Parhaps you should be able to do:
export (C):
case N {} //This has been mentioned before as a no fall through alternative
case (N) ... //Single line case statement
public { }
void func() ... //Single line function (probably hard to phase)
void func1() : //Continues until the next function (probably hard to phase)
Just an idea that I'm putting up for discussion that I don't have much
of an opinion on (except for the switch stuff, but lets not bring that
up again)
-Anderson
Jan 16 2004








J Anderson <REMOVEanderson badmama.com.au>