Tags

The Java language doesn’t support language-extension mechanisms, but happily next-generation languages for the JVM do. In “Functional design patterns, Part 3 ," Neal Ford shows how language-extension features in Groovy, Scala, and Clojure fulfill the intent of the Gang of Four’s Interpreter design pattern. He
demonstrates operator overloading in Groovy, Scala, and Clojure, then shows how class-extension mechanisms work in both Groovy and Scala. By adding units and other modifiers to core classes, you can — as with adding operators —... [More]