Let's Talk About Lambda Functions!

Jonathan Hogg jonathan at onegoodidea.com
Thu Aug 1 18:10:28 EDT 2002


On 1/8/2002 20:46, in article aic35u$ash$0 at 216.39.172.122, "Bengt Richter"
<bokr at oz.net> wrote:

> On Tue, 30 Jul 2002 13:21:56 +0100, Jonathan Hogg <jonathan at onegoodidea.com>
> wrote:
> 
>> How far does one go? Classes are first-class objects, should we also have
>> anonymous classes?
>> 
> If it falls out from actual simplification/regularization/orthogonalization
> of language expressions, IMO yes. That doesn't mean its use should be
> mandated.

I'm always torn on this sort of issue. While I'm a fan of simple/regular/
orthogonal behaviour, I also believe there's an argument for stopping before
the language disappears entirely.

The main thing I have against Ruby is that they use anonymous function
blocks all over the place. It's regular - and being a functional programmer
at heart, it's quite cool - but I think the language is less readable
because of it. I mean (taking an example from the "Programming Ruby" online
book):

-----
[ 'cat', 'dog', 'horse' ].each do |animal|
  print animal, " -- "
end
-----

This is a great idea, but something went wrong along the way. The language
became so simple as to be almost meaningless, with all of the actual meaning
becoming particular idioms.

The problem with this is that different programmers have different idioms
and the code becomes less portable (between minds rather than platforms).

As a language designer, or BDFL, there's a fine line to walk between keeping
the language growing and expressive, keeping it simple and regular, and just
keeping it sensible. Guido's done a pretty good job in my opinion. I'd say
that Python is my "Goldilocks" language - not too restrictive, not too
loose.

-WHO's-been-programming-in-MY-language?-ly y'rs,

Jonathan




More information about the Python-list mailing list