News for hackers. Stuff that matters.
Re:Poll: What's Your Favorite Programming Language? by lordlicorice on Friday March 23, 2012 @06:56PM (#3747766)
> While the language is nice, there isn't a lot you can do with it in terms of productive development that you can't at least approximate in Java

There is no substitute for lambdas :)

Re:Poll: What's Your Favorite Programming Language? by wolfgke on Friday March 23, 2012 @09:39PM (#3748166)
Re:Poll: What's Your Favorite Programming Language? by aaronblohowiak on Friday March 23, 2012 @09:51PM (#3748189)
your parent is suggesting that java does not have a substitute for lambdas.
Re:Poll: What's Your Favorite Programming Language? by spacemanaki on Friday March 23, 2012 @10:27PM (#3748268)
Which isn't true anyway, since anonymous inner classes are just very verbose and awkward lambdas. (I'm a Java hater but I'm also a horrible pedant)
Re:Poll: What's Your Favorite Programming Language? by djacobs on Friday March 23, 2012 @10:50PM (#3748310)
True. Then again, what's the practical point of lambdas that aren't concisely expressed?
Re:Poll: What's Your Favorite Programming Language? by spacemanaki on Friday March 23, 2012 @11:39PM (#3748403)
There are plenty of practical uses: http://code.google.com/p/guava-libraries/wiki/FunctionalExpl...

Note that the Guava lib specifically points out how ugly this is.

I prefer Clojure.

Re:Poll: What's Your Favorite Programming Language? by baddox on Sunday March 25, 2012 @05:27AM (#3752165)
What's the decision procedure for whether a certain expression is "concise?"
Re:Poll: What's Your Favorite Programming Language? by batista on Saturday March 24, 2012 @01:27AM (#3748584)
Horrible as in "no good" pedant?

Because, no "anonymous inner classes" are no lambdas. They are, well, classes kludgily used to mimic a lambda proper.

Re:Poll: What's Your Favorite Programming Language? by lubutu on Saturday March 24, 2012 @07:28AM (#3749095)
What it is to be 'a lambda' isn't particularly well-defined. If we define it to mean an anonymous closure then Java certainly has them — so long as its free variables are final (it closes over references). On the other hand, if we define it as the operator which creates anonymous closures, then Java doesn't, because you have to actually build the closure by hand.

Since the former have a proper name (closures) and the latter doesn't, I'd be inclined to call only the operator a 'lambda'. But since you can at least 'approximate' closures in Java (with anonymous inner classes), I think it's fair to say that they are "very verbose and awkward lambdas", to some definition of lambda.

Re:Poll: What's Your Favorite Programming Language? by spacemanaki on Saturday March 24, 2012 @12:05PM (#3749690)
lordlicorice (the ggp of my post) suggested that there is "no substitute for lambdas" and I was intending to correct that. Anonymous inner classes are definitely a substitute.