News for hackers. Stuff that matters.
Re:SICP is Under Attack by jimbokun on Thursday August 04, 2011 @10:13AM (#2846037)
"but Python supports proper closures"

Is this a recent development? Without proper lexical scoping, don't you have to do weird stuff like creating an array if you want to update a value inside a "closure"?

Re:SICP is Under Attack by Jach on Thursday August 04, 2011 @11:33AM (#2846372)
One might argue you shouldn't mix functional programming with side effects. ;P

But it's not so much the case of scoping as the case of variable binding. Assignments/statements in Python don't work like they do in some other languages. So your inner function can reference the outer "x" all it wants, but you'll get problems if you try to do something like x += 1.