Custom Blocks
Tomek Sowiński
just at ask.me
Wed Aug 11 14:54:35 PDT 2010
Robert Jacques napisał:
>> I was thinking something like this:
>>
>> void fun(int x, int y, int z, delegate void(int, int, int) dg)
>>
>> fun(x, y, z, a, b, c) { body }
>>
>>|
>>V
>>
>> fun(x, y, z, (a, b, c) { body });
>
> Mixing function args with delegate args makes me think of foreach:
>
> fun(x, y, z, (a, b, c) { body }); <=> fun(a, b, c; x, y, z) { body }
All great, but if there's no remedy for the return WTF, I'd leave this (nice) feature in the drawer.
void foo() {
fun(a, b, c; x, y, z) {
return; // who returns?
}
}
Tomek
More information about the Digitalmars-d
mailing list