Express What, not How.

ketil+news at ii.uib.no ketil+news at ii.uib.no
Wed Oct 15 07:43:22 EDT 2003


james anderson <james.anderson at setf.de> writes:

> i have no argument with the utility of lambda abstractions.  i am
> trying only to understand the implications of an argument which, at
> least as stated, rather unequivocally deprecates bindings.  the
> position which was proposed in the forgoing post was rather extreme.

You mean this position?

| A program should balance named and unnamed objects. Both are useful,
| there is a continuum between cases where one or the other is more clear

I have a hard time interpreting this as extremist.  Perhaps you should
re-read what you are replying to?

I'm rather baffled that anybody would argue against this, to me too,
it is perfectly natural to use anonymous functions in exression,
whether manifest as a lamda expressions, compositions of functions,
combinators or partial applications (are there more?).

To me, this is the same argument as that against excessive comments,
overly verbose identifiers or annotations (like Hungarian notation) -
if the code is short and clear enough, it only detracts from
readability, and, at worst, becomes misleading or wrong.  If the code
isn't clear enough, it should be rewritten.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants




More information about the Python-list mailing list