drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <dbarc...@maprtech.com>
Subject Re: decoding JsonTypeInfo on StoragePluginConfig
Date Tue, 14 Jul 2015 00:26:23 GMT
Jacques Nadeau wrote:
> ...
>
> (As a side commentary, my sense is that people have started moving away
> from interfaces in java and towards abstract classes since enhancements can
> be given default implementations rather than breaking downstream projects.
> We saw this extensively in the move from Hadoop 1 to Hadoop 2.  As such, I
> think we should be cautious about when and if we use interfaces.)

That can be addressed by declaring methods in an interface and providing a
corresponding class with the default implementations.  (Client code that
wants to just keep working can extend the class, but code that wants or
needs an interface (e.g., dynamic proxy classes) still has one.)

Note that in Java 1.8, interfaces can provide default implementations of
methods, allowing compatibility while avoiding the limitations of using
a class.

Daniel
-- 
Daniel Barclay
MapR Technologies

Mime
View raw message