InfoWorld: What if Java 8 dropped 'extends'?
Java is looking like everything including the kitchen sink. How about "give one get one" for Java 8 -- and dropping inheritance entirely?
Frankly, I think most of what Java 8 is planning to do is let the fanboys dump every feature they can think of into the language.
I'm not against those features per se, and the JVM itself should support them, but I'm less enthusiastic about the mangled syntax that is the Java Lambda project. It isn't the features that are bad, but if you stick too many ingredients in any soup, you end up with stew. Keep going and you hit some kind of food sculpture.
That seems to me to be the general direction of the Java language. Then again, I never got over how cracked the Java Generics syntax is, at least at the edges (not for using generic classes, but for making them).
Java was supposed to make things simpler
I don't believe in hierarchical ontologies. I believe in tags. When C++ came out, a lot of developers felt the need to use its features and often created horribly monstrous code that overused inheritance, virtual functions, operator overloading and templates, and all of the nonsense.
Java began the trend toward simplicity by dumping many of the more complex features in C++, such as operator overloading and multiple inheritance, sidestepping much of the need for the latter by introducing interfaces.
Many of Java's adds over the years were either workarounds for an overly persnickety and initially somewhat useless type system (such as Java 2 classloading, generics) and a lack of a read-write language metamodel (annotations, instrumentation, java.lang.reflect.Proxy).
What if we dropped class inheritance entirely?
This got me thinking about what I could live without. What could we take out of Java? As cracked as it may seem, I could live without the extends keyword.
What the frak, you ask? Well, inheritance isn't tagging -- it's enforcing a hierarchy. Pure hierarchies don't tend to exist in nature, business, or anywhere else but in the human mind. There have been languages with objects but no inheritance. OK, fine, extends Object is probably useful, but do I need to go any further...
You can read the rest of "What if Java 8 dropped 'extends'?" over at InfoWorld
If you have other inquiries about this article or Open Software Integrators generally, you should contact email@example.com.