Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements namespaces for interface methods, as discussed in #1266. In brief: - each interface has a namespace - interface method resolution uses a linearized (c4) search for appropriate methods, bottoming at the unqualified method name (for UX and backwards compatibility) - it becomes undesirable (and not easy) to call a namespace method dynamically; you really have to go through the interfrace -- and this is the desirable and safe way to invoke an interface method, as the contract is enforced. It is also now safe to assert the interface method types in the method implementation as you really have to go out of your way to bypass the contract. Follow up: - what is not implemented yet is to validate the method implementation against the interface method signature and in fact inject the signature into the method automatically. This has many benefits (both performance and safety), but it is also more complicated to implement. We can tackle this in a follow up pr.
- Loading branch information