M
Michele Simionato
Mark Hahn said:I feel strongly that the Python mixture of declaration (global), default
(where assigned) and broken (closures) is broken overall and has to be fixed
in Prothon. I take this as a given. So I see these possible solutions:
1) My Ruby-like symbols, which I think are readable and fast-compilable.
2) Word-like symbols, which are large, less readable (too me) and
cluttering.
3) Declarations, which cause the compiler and user to look around and are
not Pythonic.
Am I missing any other solutions?
You can use a different assignement syntax for outer scope variables;
for instance in Scheme there is "set!" which can do that.
BTW, I do not think the ability to have read-write closures is that
useful in an OOP language; just use objects. I would ignore this
"issue". OTOH, I do agree that Python scope rules are not 100%
perfect,
but I would content myself with changing the rule for "for" loops (see
http://groups.google.it/groups?hl=i...es&btnG=Cerca&meta=group%3Dcomp.lang.python.*)
Michele Simionato