A critic of Guido's blog on Python's lambda

Ken Tilton kentilton at gmail.com
Sun May 7 11:18:43 EDT 2006



Thomas F. Burdick wrote:
> Ken Tilton <kentilton at gmail.com> writes:
> 
> 
>>As for:
>>
>>
>>> At a syntax-sugar
>>>level, for example, Lisp's choice to use parentheses as delimiter means
>>>it's undesirable, even unfeasible, to use the single character '(' as an
>>>ordinary identifier in a future release of the language.
>>
>>(defun |(| (aside) (format nil "Parenthetically speaking...~a." aside))
>>=> |(|
>>(|(| "your Lisp /is/ rusty.")
>>=> "Parenthetically speaking...your Lisp /is/ rusty.."
>>
>>:) No, seriously, is that all you can come up with?
> 
> 
> Well, you have to quote your (s-as-identifiers.  I tried a goofy hack
> of a reader macro for ( to make this parse:
> 
>   (let (( ( 10))) ( ))
> 
> [The spaces are just for readability, not necessary]
> 
> Alas, short of cps-transforming the whole reader, I can't see a
> reasonable way to get that to parse as a single sexp that, when
> evaluated, returns 10.  What my reader macro gave me was five sexps:
> 
>   \(, LET, \(, ((10)), NIL
> 
> I'll follow up with the Lisp code (on c.l.l only), in case I'm missing
> something simple.

Stop, you are scaring the pythonistas. Even Alex thought I was serious 
with (|(| "Hi mom"). Ouch that is hard to type.


> 
> 
>>OK, I propose a duel. We'll co-mentor this:
>>
>>    http://www.lispnyc.org/wiki.clp?page=PyCells
>>
>>In the end Python will have a Silver Bullet, and only the syntax will
>>differ, because Python has a weak lambda, statements do not always
>>return values, it does not have macros, and I do not know if it has
>>special variables.
> 
> 
> I have no idea what the big problem with a multi-line lambda is in
> Python, but I wonder if Cells wouldn't run against the same thing.  I
> often pass around anonymous formulas that eventually get installed in
> a slot.  Seems annoying to have to name every formula with a
> labels-like mechanism.

(a) Right.

(b) Bloated syntax will hurt in a linear way. the decomposition of 
application complexity into so many tractable small rules is a nonlinear 
win. (ok, painful coding of X does diminish ones use of X, but Cells 
force one to use Cells everywhere or not at all, so it comes with its 
own press gang, er, discipline.)

(c) (b) might convince GvR to fix (a)

kenny

-- 
Cells: http://common-lisp.net/project/cells/

"Have you ever been in a relationship?"
    Attorney for Mary Winkler, confessed killer of her
    minister husband, when asked if the couple had
    marital problems.



More information about the Python-list mailing list