April 01, 2005
Lambda, the Ultimate Design Flaw

From Shriram Krishnamurthi, on ll1-discuss:

The Fate Of LAMBDA in PLT Scheme v300
Lambda the Ultimate Design Flaw

About 30 years ago, Scheme had FILTER and MAP courtesy of Lisp hackers who missed them from their past experience. To this collection, Scheme added a lexically-scoped, properly-functioning LAMBDA. But, despite of the PR value of anything with Guy Steele's name associated with it, we think these features should be cut from PLT Scheme v300.

We think dropping FILTER and MAP is pretty uncontroversial; (filter P S) is almost always written clearer as a DO loop (plus the LAMBDA is slower than the loop). Even more so for (map F S). In all cases, writing the equivalent imperative program is clearly beneficial.

Why drop LAMBDA? Most Scheme users are unfamiliar with Alonzo Church (indeed, they don't even know that he was related to Guy Steele), so the name is confusing; also, there is a widespread misunderstanding that LAMBDA can do things that a nested function can't -- we still recall Dan Friedman's Aha! after we showed him that there was no difference! (However, he appears to have since lapsed in his ways.) Even with a better name, we think having the two choices side-by-side just requires programmers to think about their program; not having the choice streamlines the thought process, and Scheme is designed from the ground up to, as much as possible, keep programmers from thinking at all.

I think this analysis, from LtU's coverage of Guido's plans to remove lambda, reduce(), map() and filter(), is about right:

if you want to be charitable to Guido, you could interpret his message as saying: “Look, we tried to put some functional programming tools into Python, but we ended up completely screwing them up; let's just take them all out rather than give the incorrect perception that we're a real functional programming language.”

Python's lambda is so restricted, intentionally and arbitrarily, that it cannot really support the ecosystem of useful higher order functions we take for granted in Lisp.

Posted by jjwiseman at April 01, 2005 12:04 AM

> Posted by jjwiseman at April 01, 2005 12:04 AM

Those 4 minutes must have been torture.

Posted by: Éibhear on April 1, 2005 06:33 AM

And I thought slashdot was bad. At least you expect it there, and its something of a horrible running joke that makes me wish I'd never heard of the god-forsaken hell hole.
This one actually had me until the mention of the DO loop. Everyone knows Scheme doesn't have loops, am i rite?

Posted by: atc on April 1, 2005 07:57 AM

had me going too

Posted by: on April 1, 2005 08:32 AM

I like the followup from Guy Steele on the LL1 list:

"This all looks very sensible to me. To alleviate one possible point of factual confusion: I am related to Alonzo Church only by marriage---he was my wife's grandmother's first cousin (IIRC)."

Posted by: Michael Hannemann on April 1, 2005 10:46 AM

nah, Scheme does have the DO loop mechanism.. which makes the joke all the more obvious if you've used it. the syntax for the DO form is about as clear as the hudson river.

Posted by: on April 1, 2005 07:20 PM

The joke is that the exact same post was made by Guido, Python's implementor three weeks ago. And it wasn't a hoax, in that case.

Posted by: on April 2, 2005 12:47 PM
Post a comment

Email Address:


Unless you answer this question, your comment will be classified as spam and will not be posted.
(I'll give you a hint: the answer is “lisp”.)


Remember info?