Make D a dynamic language.
Daniel Lewis
murpsoft at hotmail.com
Tue Feb 5 18:41:42 PST 2008
Russell Lewis Wrote:
> Although it wouldn't be as elegant as a native language solution, you
> could accomplish (somewhat) the same with an associative-array of
> varargs delegates.
That's easy:
PSEUDOCODE
struct Value {
union {
Value[char] o;
Value function(Value self, Value cc, Value[] arguments) f;
}
opIndex...
opIndexAssign...
opCall...
}
Optimize and extend from there.
PSEUDOCODE
Value x;
x['bob'](x, x, [x,x]);
Regards,
Dan
More information about the Digitalmars-d
mailing list