Steven Schveighoffer wrote:
Sure, but what is the reason to need dynamic methods? I'm just trying to understand the usefulness of it. If a method is dynamic, we lose the following things:

- compile-time type/signature checking
- IDE assistance in determining which methods are available
- ease of tracing where a method call goes.
- not future proof -- for example, if a method name gets changed or moved, the code using the method still compiles.

If we lose all these things, there must be *something* we gain by doing this, right?

There are people who swear by the ability of adding methods at runtime and changing the inheritance hierarchy dynamically. It makes for a very fluid environment.

Also, what is the benefit of doing something like this versus specifically calling the dispatcher instead of having the compiler translate it?

Probably that's more of a "last mile" thing.


Andrei

Reply via email to