[Issue 2050] interfaces should allow final methods with body

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 4 08:01:43 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2050





------- Comment #10 from sandford at jhu.edu  2009-04-04 10:01 -------
(In reply to comment #0)
> Consider:
> 
> interface Foo
> {
>     void bar();
>     final void baz() { bar; bar; }
> }

How is this superior to the current interface + mixin approach? Or an
mixin-able interface approach?:

class A:Foo {
    mixin Foo; // Add Foo's final/static method bodies to A
}


-- 



More information about the Digitalmars-d-bugs mailing list