don't OOP languages do them best? :-)
I am not sure about that smiley... No they don't do a very good job at all.
OOP provides one narrow view of interfaces, which has its uses and has proven itself useful in practice. However, it is far from being the only meaning of the term, and OO interfaces by themselves (with no guiding rules to keep you from shooting yourself in the head) can cause a lot of problems. Deep inheritance hierarchies seem to produce hard to maintain code (though the literature is inconclusive), something that is not obviously true for 'true' interfaces (i.e, layering). Other issues we discussed here also point to problematic areas: co/contra-variance;multiple inheritance (and mixins etc.); substitutionality is not guaranteed etc.
Worse: even if you overcome all these (which you won't), OO brings dynamic binding (even though some things can be done staticaly) which means pointers, memory mangement issues etc. This is true even when none onf this is required as far as interfaces are concerned (i.e., interfaces don't imply dynamic binding).
Another issue, related to PL research, is expressiveness. Consider the interface provided by a function in ML/Haskell giving you a polymorphic type signature, which uses high order functions, and is inferred from the code. Now copy this to OO. Doable, but far from easy or fun.
These are just some key points, I have more... OOP has its place, esp. as regards implementation reuse. As far as interfaces are concerned it is quite problematic, though still useful in practice.
|