reduce()--what is it good for? (was: Re: reduce() anomaly?)
robin at jessikat.fsnet.co.uk
Tue Nov 11 09:43:28 CET 2003
In article <vr057vjp1j7f06 at corp.supernews.com>, Francis Avila
<francisgavila at yahoo.com> writes
>"Alex Martelli" <aleax at aleax.it> wrote in message
>news:BsJrb.445840$R32.14865362 at news2.tin.it...
>> Francis Avila wrote:
>>> [a reduce() clone]
>> [a long and thorough critique]
>*Sigh* My only objective was to combine functional/recursive/iterative
>programming styles into an olive branch to extend to both parties of this
>But oh well. Like I said, I never found a use for reduce, but alas, I am a
>ham-fisted programmer entirely lacking in subtlety and art....
This whole thread is reminiscent of vi vs emacs or an os war or similar.
It's a pity that people with a preferred style should be so dogmatic
that they want to remove language features to prevent others using them.
The whole 'only one way to do it' concept is almost certainly wrong.
There should be maximal freedom to express algorithms. As others have
stated min, max,... sum et al are useful specialisations, but because
they cover 99% of the space doesn't mean that reduce is redundant.
-Eliminate reducespeak and control the future-ly yrs-
More information about the Python-list