ceylon/ceylon-spec — Issue #158: Using & with 'satisfies' for multiple interfaces is intuitive but inconsistent.
Author: compman775
Created: 2012-02-03 22:09:07+00:00
State: open

Ceylon uses & for intersections of types (the things that types have in common).
Ceylon uses | for unions of types (everything that any of the types contain).
Ceylon uses & with 'satisfies' to mark a class as satisfying multiple interfaces.

Using & ("and") is intuitive here. The class satisfies interface A and interface B, so you use &.

However, the full type that the class satisfies is logically a union type.

Should & really be used instead of |?