Feature request: extending comma operator's functionality
Tommi
tommitissari at hotmail.com
Thu Oct 4 15:30:54 PDT 2012
On Thursday, 4 October 2012 at 22:28:24 UTC, David Nadlinger
wrote:
>
> Yes, a language designed could make that choice. But not, it
> certainly won't be considered for D unless it can be shown that
> the change solves a real problem with the current syntax.
But I'm not suggesting any kind of change in syntax. This syntax
in D currently works (as long as expr2 is convertible to bool):
if (Type var = expr1, expr2)
{
//...
}
What I'm suggesting is, I think, quite reasonable: make it so
that 'var' is visible to 'expr2'.
More information about the Digitalmars-d
mailing list