The bad thing about existing nominally typed OO PLs is that you can't post-hoc let a class implement an interface. If you could add new methods to any class, and then declare that the class now implements a new interface, you'd get the practical benefits of structural typing.
-
-
In which of these languages can I do this: add new methods to class C, declare that C now implements interface I, and now have every instance of C be an instance of I?
-
All of them.
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!