News for hackers. Stuff that matters.
Re:More information on Google's new web language, Dash by riffraff on Saturday September 10, 2011 @01:57AM (#2980958)
what scoping rules make javascript better than python for evented programming? I am not a big JS writer, but I can't seem to see anything important (nested functions, globals).

Maybe you are referring to the fact that JS has an arguably better syntax for anonymous functions?

Re:More information on Google's new web language, Dash by sid0 on Saturday September 10, 2011 @04:17AM (#2981143)
Python has implicit declarations, which lead to a world of hurt because you can't directly modify variables in arbitrary scopes. Python 3 has nonlocal, but that only extends the number of function scopes you can refer to to three.

I think having implicit declarations is probably the worst mistake Python made. It just makes things so much more confusing.

Re:More information on Google's new web language, Dash by sid0 on Saturday September 10, 2011 @09:02AM (#2981503)
Sorry, I made a mistake: nonlocal gives you as much power as usual closures. I still stand by my statement that implicit declarations make things very confusing.
Re:More information on Google's new web language, Dash by crizCraig on Saturday September 10, 2011 @02:17AM (#2980993)
In python nested functions must be declared before calling them. Also stuff like this seems to crop up on me when I ry using closures: http://stackoverflow.com/questions/2516652/scoping-problem-i...
Re:More information on Google's new web language, Dash by riffraff on Saturday September 10, 2011 @09:23AM (#2981530)
that is what I meant as having a better syntax for anonymous functions. I agree it's bad (even with nonlocal in python 3) but that is not a matter of different scoping rules, it's only syntax.