Python syntax in Lisp and Scheme
ketil+news at ii.uib.no
ketil+news at ii.uib.no
Tue Oct 14 11:08:12 EDT 2003
Raffael Cavallaro <raffaelcavallaro at junk.mail.me.not.mac.com> writes:
> I think it is the mark of functional cleverness that people's code is
> filled with anonymous functions. These show you how the code is doing
> what it does, not what it is doing.
Uh, I often use a lambda because I think it improves readability.
I could write
(,) x . length . fst
but think
\(a,_) -> (x,lenght a)
is clearer, because it is *less* functionally clever. Of course, it
could be written
let pair_x_and_length_of_first (a,_) = (x,lenght a)
in pair_x_and_length_of_first
but I don't think it improves things, and in fact reduces lucidity and
maintainability. Naming is like comments, when the code is clear
enough, it should be minimized. IMHO.
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Python-list
mailing list