Express What, not How.

ketil+news at ii.uib.no ketil+news at ii.uib.no
Thu Oct 16 15:26:53 EDT 2003


Raffael Cavallaro <raffaelcavallaro at junk.mail.me.not.mac.com> writes:

> In article <eg7k35mpgu.fsf at vipe.ii.uib.no>, ketil+news at ii.uib.no wrote:

>> Anonymous functions *can* be more clear than any name.

> This belief is grounded in a desire to keep the program's language close 
> to the programming language, rather than moving the program's language 

So, does that mean you disagree?

> This stands in direct opposition to those who think that software should 
> seek to _avoid_ names whenever possible. 

As far as I can tell, nobody holds this position.

> I, on the other hand find this  simple equation is true:

> Names = Clarity
> (specifically, names taken from the problem domain)

Sure, to some extent.  More names isn't always more clarity, though.
And compactness, locality and simplicity also adds to clarity.

> Some posters here have replied that this is just "obvious," and true 
> independent of the issue of anonymous functions. But the two issues are 
> _of_necessity_ related, because you cannot have both names and anonymity.

You can have, as has been pointed out, a *balance*, naming the
important things (be they functions, data types, or values) while
leaving less important things unnamed. 

I and others have come up with simple examples that we feel show that
anonymous functions improve clarity.  Your posts are more dogmatic,
which would be fine, except that I apparently fail to interpret your
position correctly.  

So, do you agree or not that anonymous functions can improve clarity
in some cases?

If not, are you also against anonymous values of other kinds
(intermediate arithmetic results, say; or types)?

Do you agree with the specific cases posted to this thread?  
If not, could you point out why?

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




More information about the Python-list mailing list