Default method implementations in interfaces?
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Oct 23 08:52:55 PDT 2015
On 10/23/15 10:58 AM, pineapple wrote:
> Is it possible to have default method implementations in interfaces à la
> Java in D? Or some equivalent that allows multiple inheritance without a
> bunch of identical copypasted method bodies?
If the idea is to have an implementation that *doesn't* get overridden,
you can have final methods in an interface.
I know it's not what you asked for, but sometimes people may ask for
something they know not realizing that something else may satisfy their
needs :)
-Steve
More information about the Digitalmars-d-learn
mailing list