[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accumulator
Adam Turoff wrote:
>
>...
> >
> > "reduce" may be the right thing for Lisp programmers but we have
> > concrete proof that it is not the right thing for Python programmers.
>
> That's a very weak argument.
Where is the weakness? Many Python programmers understand functional
programming and simply choose not to use reduce. It has been in the
language for probably seven years now. At what point are we allowed to
admit it was a failure? Strange that I'm the one criticizing a Python
feature and you're defending it.
Reduce has (AFAIK) nothing to do with your LWP example. Sure, a
functional style of programming is useful sometimes which is why Python
has functions, list comprehensions and first-class method objects.
Rebindable closure variables hardly have anything to do with functional
programming. In a strict sense, rebinding is a side effect, isn't it?
Paul Prescod