On Tuesday, 9 June 2015 at 08:33:04 UTC, Kagamin wrote:
Extension methods are conceptually the type's methods. The type's interface is a conceptual thing, I don't think it has anything to do with physical layout of source code.

This is a tricky issue. If you have structural typing (which Ada-style generics, C++ and D templates are a close, but weak, cousin to) then adding an extension method as a first class method will then change the type-resolution... which affects what kind of features you can have that use type resolution. Is the extension global or local? What if two extensions differ in semantics, but not in name? Not a problem for nominal typing, but a problem for structural/duck-like typing when you scale up.

Reply via email to