DMD 0.161 release

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Thu Jun 22 08:16:25 PDT 2006


Ben Hinkle wrote:
> In general I agree function call speed isn't a big deal for interfaces but
> it isn't unusual to have an interface that abstracts out a field lookup
> (eg, getLength). For those the body of the implementation would be very
> simple. I'm curious if the double lookup technique has been tried in
> practice and what the impressions were.

Does any commonly used language / compiler implement these double lookups?


Like xs0 said, the decrease in overall speed is ridiculously small. Most
(non-pro guru) Java programmers I know of use interfaces this way a lot
despite the obvious drawbacks in performance. I think that beefing up the
compiler logic just a little bit here pays itself back faster than we can
even imagine. At least it makes the life of application programmers and
thus end users a bit easier (better modularity, less error-prone casting).

To me it sounds a bit weird that Walter has promised to implement array
literals, but interfaces are going to be left broken. They're can be both
implemented now by using template hacks and seem to be equally hard to
implement.

-- 
Jari-Matti



More information about the Digitalmars-d-announce mailing list