namespaces

Paul Rubin http
Mon Aug 1 00:03:36 EDT 2005


Steven D'Aprano <steve at REMOVEMEcyber.com.au> writes:
> Most languages can create self-modifying code. That's not the
> question. The question is whether developers should write
> self-modifying code, not whether language designers should prohibit it.

There was no self-modifying code in that closure example.
Self-modifying code means something entirely different.  

Closures are a tried and true technique that are thematic in Lisp
programming (Python tends to use class instances instead).  They take
some getting used to, just like, say, recursion.  And like almost
anything, they can be abused.  But they're a completely legitimate
approach to lots of types of problems.

See the book "Structure and Interpretation of Computer Programming"
for an intro to programming based on closures.



More information about the Python-list mailing list