Ideas regarding flow control and loops

Marco Aurélio thecoreh at gmail.com
Sat Nov 3 13:17:15 PDT 2007


downs Wrote:

> if (auto foo=cast(Whee) bar) { /* use foo* }
> 
> ISN'T IT NEAT?
> <3 D.

Indeed. Even better:

if (auto bar = cast(Whee) bar) { }

So the variable bar of type "Whee" would hide the other variable bar at the local scope.

But I still think it would be usefull to have the if+with statement.



More information about the Digitalmars-d mailing list