WithStatement
Shahid
govellius at gmail.com
Sun Jul 24 12:44:45 PDT 2011
I've been using the WithStatement alot recently and there's a situation
that's really bugging me.
my code is similar to the following:
struct Struct
{
enum Enum1 { A, B, C }
enum Enum2 { D, E, F }
...
}
T foo( ... )
{
with ( Struct )
{
bar( Enum1.A );
...
...
}
}
I'm wondering what others think about extending the WithStatement to take
a colon, which would create an implicit scope similar to how Attributes
work. eg:
T func( ... )
{
with ( Struct ):
bar( Enum1.A );
...
...
}
More information about the Digitalmars-d
mailing list