***** D method override mechanisms borked ******
xs0
xs0 at xs0.com
Mon Jun 26 03:09:34 PDT 2006
Just a slight correction :)
> xs0 told in D.announce that it's possible to extend the
> functionality of interfaces without any extra overhead at all (but it
> would require more from the optimization logic of the compiler).
It's possible to eliminate (time) overhead for calls on the same
reference beyond the first (like in a loop or whatever). The first call
of an interface method would still be about twice as expensive* as a
"regular" virtual call (now it's just a few percent slower).
On the other hand, there'd be no need for implicit casting on function
boundaries that is happening now (currently, if you pass/return a class
reference to a function expecting an interface reference, an implicit
(runtime) cast happens, which would no longer be necessary).
xs0
*) that's just the speed of the call sequence, obviously the function
itself executes at "regular" speed, so the difference is not that large
in practice
More information about the Digitalmars-d-bugs
mailing list