D2 GUI Libs
Michel Fortin
michel.fortin at michelf.com
Mon Dec 14 18:33:18 PST 2009
On 2009-12-14 20:56:12 -0500, "Nick Sabalausky" <a at a.a> said:
> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
> news:hg698i$2rpd$1 at digitalmars.com...
>> 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
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list