Super-dee-duper D features
janderson
askme at me.com
Wed Feb 14 00:15:32 PST 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Bill Baxter wrote:
>> Andrei Alexandrescu (See Website For Email) wrote:
>>> Bill Baxter wrote:
>
> Because it doesn't keep bound variables together with the data. Perl has
> a way of initializing multiple variables that is unnerving:
>
> my ($a, $b, $c) = (e1, e2, e3);
>
> The long-distance relationships make it so irritating when ek are more
> than a couple of characters, I often give up and write:
>
> my $a = e1;
> my $b = e2;
> my $c = e3;
>
> even though I try to use vertical space sparingly.
>
>
> Andrei
IMO, the original version that you've suggested looks best. I can't see
any way of improving the syntax. Well maybe the continue part could be
improved, like:
foreach (i ; coll1) (j ; coll2)
{
... use i and j ...
}
continue(i)
{
... coll2 finished; use i ...
}
continue(j)
{
... coll1 finished; use j ...
}
Or perhaps a word like "finish" would be better.
-Joel
More information about the Digitalmars-d
mailing list