proposal: allow 'with(Foo):' in addition to 'with(Foo){..}'

safety0ff via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 10 01:44:59 PDT 2014


On Sunday, 10 August 2014 at 08:34:40 UTC, Era Scarecrow wrote:
>
> Depends on how many pesky extra braces you want to avoid...
>
> enum Flags {a,b,c,readonly,write,etc}
>
> void func(Flags f){
>   switch(f) {
>     with(Flags):   //or put this outside the switch...

For that specific case, put it outside the switch and drop the 
colon:
http://dpaste.dzfl.pl/f3e78f3265a7


More information about the Digitalmars-d mailing list