On 2009-12-14 20:56:12 -0500, "Nick Sabalausky" <[email protected]> said:
"Andrei Alexandrescu" <[email protected]> wrote in message
news:[email protected]...
Maybe opDispatch could help the use scenario.
Andrei
As opDispatch pushes errors from compile-time to run-time, I don't think we
should be encouraging its use for anything that isn't inherently dynamic.
First, opDispatch is a template, so it's not dynamic dispatch unless
your template effectively do its dispatching at runtime. I don't think
Andrei was proposing dynamic dispatch here.
And since we're talking about dynamic dispatch: for the overridden
methods to work when you create a D subclass of an Objective-C class,
all methods have to be declared at compile time, even though in
Objective-C they're dynamically bound. The goal of the bridge is to
expose Objective-C objects as D objects, and thus overriding must work.
It'd be pretty useless if it didn't.
--
Michel Fortin
[email protected]
http://michelf.com/