Abstract interfaces were introduced in the type system of the NiceLanguage. They have two distinguishing features compared to usual interfaces:
- An existing class, declared in another package and for which you might not even have the source code, can be made to implement an abstract interface. This solves a big problem with object oriented design. You don't need anymore to do a BigDesignUpFront by figuring out in advance what set of interfaces are relevant in your domain, and for each class all the interfaces that it implements. This ability invalidates the biggest argument in favor of DynamicTyping. There is an example of how this can be used to make standard classes like String and Throwable share a common property, in that case that of being a value you can pass to a log system. See http://nice.sf.net/manual.html#abstractInterfaces for the complete example.
- Abstract interfaces are also used to type partially polymorphic methods: http://citeseer.ist.psu.edu/bonniot02using.html
CategoryLanguageFeature