Revising interfaces
Mark Thornton
mthornton at optrak.co.uk
Fri Dec 11 02:16:17 PST 2009
There are some interfaces (e.g. java.sql.ResultSet) that have been
changed many times. Presumably the theory is that not too many implement
those interfaces and thus not too many will be annoyed by the changes.
Could we consider annotating interface methods (@since("1.1") perhaps)
and providing a default implementation for those methods. Then require
the JVM to insert the default implementation when loading
implementations of the interface (and where the method is not already
implemented).
This would preserve all the existing character of interfaces. The down
side is potential collision with existing methods having the same
signature, but that is something of a hazard with extension methods as well.
Mark Thornton
More information about the lambda-dev
mailing list