Interface Extensions
Extensions can not only add new functions to types but also make existing types implement an interface. The syntax is extend<T> Type<T> <: Interface, providing the required function implementations in the extension.
The code on the right defines a PrintableSize interface, then makes Array<T> implement this interface through an extension. After the extension, arrays can be assigned to variables of type PrintableSize and used anywhere that interface is required.
Even if a type is defined in a third-party library, you can make it satisfy your interface contract through extensions.
Note
Cangjie has a similar "orphan rule": interface extensions must be in the same package as either the interface or the extended type.
Try modifying the PrintableSize interface to add more functionality and implement it in the extension.