[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: for loops
- From: alan@... (Alan Watson)
- Date: Fri, 31 Oct 1997 13:21:50 -0600
> At one
> hand, it is almost useless to be able to write a nested function without
> access to local variables of the enclosing environment.
Hmm. I'm not so sure. A number of languages allow nested function, but
within nested function it is only possible to access the current
function's locals and globals. This is a very clean and easy to
understand model, and it has been proven to be useful over a time span
that stretches from BCPL to Python.
You can get around some of the restrictions by providing a few more
builtin-looping functions, such as Python's map, filter, and reduce
(see the "Lambda And Functional Programming Tools" section of
http://www.python.org/doc/tut/tut.html).
My reaction to %foo is that on the whole I'd rather have a simpler
language than a more powerful one.
Alan