Steve Yegge's rant on The Next Big Language
BCS
BCS at pathlink.com
Mon Feb 12 09:25:04 PST 2007
Jarrett Billingsley wrote:
>
>
> Except for the typing system (though it could certainly get there), the
> absolute lack of tools, and missing about half of the Kitchen Sink points ;)
Half?, more like one or two hard misses and a few more close calls.
I can kill one close calls:
>4 Destructuring bind (e.g. x, y = returnTwoValues())
If I'm reading it right this does that, and nicely:
struct SetT(V...)
{
V args_m;
static SetT go(inout V args)
{
SetT ret;
foreach (i, arg; args) ret.args_m[i] = arg;
return ret;
}
void opCall(inout V args)
{
foreach (i, arg; args_m) args[i] = arg;
}
}
SetT!(int,int) bar(int i, int j)
{
return SetT!(int,int).go(i,j);
}
void main()
{
int i=1,j=2,k=0,l=0;
bar(i,j)(k,l);
writef("[k,l]=[%d,%d]\n", k,l);
}
More information about the Digitalmars-d-announce
mailing list