Reply to Yigal,

Personally I prefer to have syntax for "blocks" like Ruby/smalltalk.
given the following example function:
int func(int a, delegate int(int) dg) { .. }
// call func with [something in this spirit is my favorite]:
func(someInt) { | int a, int b | return a+b; };


how about require that the block arg in the called function name the args

int func(int a, delegate int(int val, int thing) dg) { .. }

and then pull in those names implicitly

func(someInt) { return val+thing; };

This would have implication in overloading and what not but it would be syntactically clean.


Reply via email to