Express What, not How.

Adrian Hey ahey at NoSpicedHam.iee.org
Wed Oct 15 02:09:04 EDT 2003


james anderson wrote:
 
> Marcin 'Qrczak' Kowalczyk wrote:
>> Most high level languages have anonymous functions for a reason.
>> 
> 
> i'm just wondering if you're serious about all of this.

I think Marcin is serious, and any Haskeller would agree I suspect.

A good example from Haskell would be the use of lambda abstractions
as the second argument of the monadic >>= operator. Supplying names
for all those abstractions would be really awkward and yield highly
unreadable code IMO.

For those that don't like all those lambdas, Haskell's imperative style
"do" expressions can be used instead, but only for monads. There are
still occassions where explicit lambda's are an easier and clearer
alternative than defining named functions.

Regards
--
Adrian Hey




More information about the Python-list mailing list