Custom control flow statements
Michiel
nomail at hotmail.com
Tue Feb 13 13:35:52 PST 2007
> I guess my main concern is what happens when semicolon typos occur. If
> something like this is valid:
>
> if(true)
> writefln("foo");
>
> Would the same logic apply in situations like:
>
> writefln("foo")
> writefln("bar");
I tried this: writefln("foo", writefln("bar"));
It gives a compiler error. So it may be a bad example. But you do have a point.
Maybe a special keyword should be used to tell the compiler you want the special
behavior. Like:
void functionName(int param1, loose void delegate() statements) { ... }
More information about the Digitalmars-d
mailing list