Some language proposals.

Terry Reedy tjreedy at udel.edu
Thu Feb 26 10:14:55 EST 2004


"Jacek Generowicz" <jacek.generowicz at cern.ch> wrote in message
news:tyfk72amei6.fsf at pcepsft001.cern.ch...
> language Nirvana" threads. You see, I use Python because it lets me
> gets certain jobs done easily and enjoyably, and don't really much
> care for language patriotism. I will fiercely defend Python on its
> merits (which are legion), but that does not preclude me from
> sometimes noting that it would be handy if something were different
> than it is right now.

Sounds sensible.

> My contribution to this thread started with a question: I paraphrase
> "why are Python closures read only?".

As I said before, because Python has a 'write locally unless directed
otherwise' rule, which is not going to change, and because no one has yet
come up with a convincingly good syntax or method to replace or extend the
global directive for directing otherwise -- where convincely good mean
enough better than mutable wrapping to be worth the bother.  And because no
one has yet cared enough to effectively push the issue further.

On the aesthetics of wrapping:  with a C background, the notion of rebind
vars in something else's strikes me as 'odder' that mutating a mutable.  So
I do not see n = [n] as being that ugly, while understanding that someone
with a 'full-closure' language background well might.  On the other hand,
the non-uniformity of write local, write global, but not in between, is
bothersome enough to enough developers that there was serious discussion of
how to do it.

Terry J. Reedy







More information about the Python-list mailing list