View Single Post
  #3   Spotlight this post!  
Unread 31-03-2013, 21:06
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Anonymous functions

I'm generally of the opinion that little bits of ugliness like that are necessary evils in programming. While I'd love it if everything could be simply and elegantly expressed, reality tends to disregard my desires. However, the example you gave was such that the only non-"ugly" solution was what you suggested, which isn't possible in Java. Depending on what you're trying to do (as opposed to how you're trying to make it look), there might actually be an elegant solution.
__________________
I code stuff.
Reply With Quote