News for hackers. Stuff that matters.
Re:The iPad is the new IE6 by __david__ on Friday February 04, 2011 @03:15AM (#2178779)
> Python and Ruby do them too..

Ruby has decent lambdas/closures, but Python absolutely does not. Its lambas are horrifically limited. Because of that alone, Javascript is a much better at functional programming than Python.

I agree that default global scope is a misfeature, but the solution is trivial--declaring variables--which I think makes the language much more readable anyway. I quite dislike the Python style of coding in which the local variables are just causally used without listing them somewhere--it's too easy for things to get lost. On the other hand, maybe I just need better syntax highlighting? The new "use strict" should completely fix accidental globals, as I understand it.

People complain about the implicit type conversions but I'm not sure I've had that pose a problem in real life and I've written my share of Javascript. I'm not even sure what that kind of bug would look like. I'd love an example.

Re:The iPad is the new IE6 by glenjamin on Friday February 04, 2011 @07:17AM (#2179164)
I don't agree with your assessment of python closures. Just because you have to name all inner functions doesn't mean they're not proper closures.