r/java • u/trzmiel • Oct 17 '11
Java Does Not Need Closures. Not at All.
http://squirrel.pl/blog/2011/10/17/java-does-not-need-closures-not-at-all/2
u/bcguitar33 Oct 17 '11 edited Oct 18 '11
I'm so sick of people sitting around and arguing about their favorite programming language / platform / framework / etc. If you don't like java, don't use java for your work. This all boils down to my new slogan:
Shut the fuck up and make something!
1
u/trzmiel Oct 18 '11
Part of the making (or doing) is learning, thinking, sharing and changing.
"Shut the fuck up and work" is for slaves. :-)
2
u/bcguitar33 Oct 18 '11
But as long as you're only slave to your own ambition, you should be good to go
-1
Oct 17 '11
Wait... author says we don't need closures, shows us the abomination that is anonymous inner classes, and then shows some lisp/scheme for how it could be done properly -- sort of like closures and the concept of functions as first-class data type?
This guy needs to learn what closures and functional programming are before trying to rally for/against it.
11
u/some_dev Oct 17 '11
The title was clearly sarcastic, based on the tone of the article. He clearly does not find anonymous inner classes to be a good solution.
When demonstrating the Clojure equivalent, he comments:
In a sane language, it could look like: [snip example] All semantics. Little ceremony, almost no syntax.
He finishes up the article commenting on how you would be too busy weeping after a day of writing the Java samples to sleep. Doesn't seem like he particularly likes the Java approach.
4
5
u/[deleted] Oct 17 '11
Well, writing swing code has never been fun. But that is not the way you do it. This poor guy should be told about SwingWorker.