Steve Yegge's rant on The Next Big Language
BCS
ao at pathlink.com
Mon Feb 12 23:24:41 PST 2007
Reply to Bill,
> And should at least allow bar to be implemented like:
>
> SetT!(int,int) bar(int i, int j)
> {
> return SetT(i,j);
> }
struct SetT(V...)
{
V args_m;
void opCall(inout V args)
{
foreach (i, arg; args_m) args[i] = arg;
}
}
SetT!(V) Set(V...)(V args)
{
SetT!(V) ret;
foreach (i, arg; args) ret.args_m[i] = arg;
return ret;
}
SetT!(int,int) bar(int i, int j)
{
return Set(i,j);
}
It still has that odd left to right assignment.
More information about the Digitalmars-d-announce
mailing list