Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe...
by aboodman on Friday May 06, 2011 @06:34PM
(#2522726)
Answer: the inner class can only access constant locals :(. So you have to put any mutable state in members.
Blech. This might work for some cases, but would be a huge pain in the ass in others.
Basically, I'm just stealing the JavaScript-y way of doing this that uses closures: