"Lew" <lew@lewscanon.com> wrote in message
news:QsSdnRC6f80PBSDanZ2dnUVZ_i2dnZ2d@comcast.com...
Mike Schilling wrote:
And given how the JVM and bytecode work, it would, unless I'm
missing
something, be equally true of a Java language feature that
performed
delegation. That is, the feature would generate bytecode to do the
forwarding (possibly being clever enough not to generate forwarding
methods for methods that are hand-coded), not adjust its beahcior
at
run-time according to the version of the interface currently
loaded.
Ditto with abstract classes and new abstract methods.
Yup. One of the advantages of defining an abstract class that
clients can extend vs.defining an interface for them to implement,
is that you can later add new methods by giving them default
implementations. Obviously this won't always work, and there are
disadvantages to abstract classes as well, but it's something to
consider when designing a framework.
feature. It would require auto-delegation logic at the JVM level
makes it unlikely to ever happen. Looking at the hoops they jumped