Re:Execution in the Kingdom of Nouns (2006)
by abc_lisper on Thursday February 14, 2013 @02:07PM
(#5221336)
1. No, its not an anon inner class. Anon inner class is when you implement a interface, by defining its methods inline.
2. Yes, it is bad that we have to write all that verbose code. Java's typechecker is useless where it could be most useful, by typechecking high level types. You have to write all this code everytime to make it happy.
Alas, all the alternate functions are defined in one place in advance for the caller/user of "funcMap()", which makes it hard for an app to put in definitions for a library. To get out of that, you have to make an interface than funcMap()'s container implements, and add more code -- Yegge's point! (verbosity)
It's still a useful technique, just verbose.