Re: Refactoring to a Closure
"twitter.com/nfma" <[email protected]>
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
That has been my experience, to have to use the more cumbersome anonymous inner class where a closure would be a perfect solution. And refactoring to closure would be a very handy refactoring to have for all those verbose anonymous inner classes I have to use. :) 2009/12/19 Mirko Stocker <[email protected]> > > > Hi! > > > On Friday 18 December 2009 22:48:42 jcsextro wrote: > > I won't write any code using closures because a closure isn't the > simplest > > thing that can work. I know this because of the millions of bits of code > > that I have already written in Java without closures. > > But, if closures weren't even available in the languages you used, no > wonder > you haven't had the chance to use them :-) How many times have you used an > anonymous class in Java? I'd bet that in most cases, passing a simple > closure > would have done the job as well, and with much less code to write. > > I'd recommend to take a look at Scala to see how Java with closures could > look > like. > > Regards > > Mirko > > > [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/refactoring/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/refactoring/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/