[Mono-list] late linking & dynamic invocation ...

Ben Hutchison ben.hutchison@intamission.com
Fri, 5 Jul 2002 10:36:56 +0100


----- Original Message -----
From: "Michael Meeks" <michael@ximian.com>
>
> I want to be able to do:
>
> Delegate *del = new Delegate (my_long_int_short_string_method);

As I said in an earlier message, would you care to propose a syntax for this
feature that will handle overloaded methods?

Let me spell it out: you can have many methods with the same name but
different signatures. How are you going to indicate which one you mean? You
will need to include type info, so you've just lost what you tried to gain.

>
> or better, have an auto-coercion built into the method signature so
> that one doesn't have to type "new" anything :-)
>

Do you mean "coerce a method name to a delegate"? Delegates are distinct
objects, so coercion would seem to involve an implicit object creation.
AFAIK, (except boxing) it would be a sole case of runtime object creation
without new keyword, and would require another syntax anyway to indicate the
coercion. Too inconsistent, IMHO.

Ben