Feature request: extending comma operator's functionality

Tommi tommitissari at hotmail.com
Thu Oct 4 16:38:52 PDT 2012


Maybe we forget about commas then, and extend if-clauses so that 
you can properly define variables at the beginning of it. 
Separated by semicolons.

string name;

if (string street = nextStreet();
     int number = nextNumber();
     auto person = new Person(name);

     person.livesAt(number, street))
{
     // use street, number, and person
}


More information about the Digitalmars-d mailing list