Also, if you're using a flat type hierarchy where classes never inherit, but only extend interfaces, you're better of using a different language which natively supports a structural typing style, such as Go, OCaml, or Objective C.
To be fair to original article, this does mean I'm doing my best to avoid type hierarchies...
It probably originated in Flavors, an object system for Lisp (see http://en.wikipedia.org/wiki/Flavors_%28computer_science%29)
Then Allison and I saw Dr. Black present the Smalltalk traits paper and she realized that their formalism was exactly what I'd been talking about informally, so we borrowed that instead.
The only difference that I can think of is that mixins are declared at class declaration, is that what you mean?
Taking the interface approach further, your classes that operate on your data would take in objects by interface e.g.:
public class IsinValidator
...
public bool Validate(IIsinSecurity security)
{}Sometimes the code is complex because the problem is complex.
So we might have the interface ISecurityWithIsin , IOption etc.
This has the advantage of allowing
a.) easy use of mocking, dependency injection for testing.
b.) Classes can implement more than one of these interfaces.
The question then becomes- where do you put your base, shared functionality (e.g. a method that is common to all stocks with Isin numbers). Possibly this becomes another set of classes...