The Non-Virtual Interface idiom in D
"Jérôme M. Berger"
jeberger at free.fr
Sun Sep 27 08:05:31 PDT 2009
Michel Fortin wrote:
> I fully support having a way to specify a default implementation for a
> function in an interface. It might get handy for a few things (like
> implementing the delegate pattern you see everywhere in Cocoa). But it's
> a bad replacement for contracts.
>
Then what's the difference between an interface and an abstract
class? I thought that the whole point of interfaces was that you
couldn't have implementations of the methods so that you had no
problem choosing an implementation when inheriting from multiple
interfaces.
Jerome
--
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20090927/d93e20b6/attachment.pgp>
More information about the Digitalmars-d
mailing list