Another variation on Chris's @commonfields and Tom's @base & @extend 
<&@extend>:

This is somewhere between example 2 and 3, 
Avoids copy and paste of example 2
Avoids delegating to Foo of example 3 

abstract AbstractFoo

type Foo <: AbstractFoo
    bar
    baz
end

type Foobar <: AbstractFoo
    @splatfields Foo
    barbaz
    bazbaz
end

Also allows for "multiple" composition/inheritance.

 

Reply via email to