2 ms·
>instead of describing how objects fit into a taxonomic hierarchy, objects or typeclasses are described by what behaviors they fulfill. Can't this be said abou
by eitland 16y ago
>instead of describing how objects fit into a taxonomic hierarchy, objects or typeclasses are described by what behaviors they fulfill.
Can't this be said about Java interfaces too?
- chromatic 16y agoYes and no. Java interfaces are a very degenerate case of roles. They provide no default behavior (a few constants notwithstanding), they are special cases in at least part of the type system (declaring a class does not also declare a role), and I know of no good way to handle conflicts when implementing multiple interfaces with overlapping requirements.