Skip to main content

Neal Ford: Java.next: Extension without inheritance, Part 1

Groovy, Scala, and Clojure offer many extension mechanisms, whereas inheritance is virtually the Java language's only option. This installment looks at category classes, the ExpandoMetaClass, implicit casts, and protocols as ways to extend Java classes with the Java.next languages... The Java language's design included some purposeful omissions to avoid perceived problems with its predecessors. For example...

Community: