4 ms·
Methinks the enumeration of "Lisp's essential features" a tad short. 1. Coding JS quite a bit these days, I greatly miss every form returning a value. 2. Python
by kennytilton 8y ago
Methinks the enumeration of "Lisp's essential features" a tad short. 1. Coding JS quite a bit these days, I greatly miss every form returning a value. 2. Python's lambda is just sad, and GvR keeps threatening to remove even that. And people, please, once and for all, 3. those parentheses and where we put the operator are absolutely essential to the Lisp experience.
- kennytilton 8y ago4. Lisp indents itself. This alone speaks volumes. That said, credit where due, Python code does look great.
- fulafel 8y agoRe 2 - are you bothered by the fact that there is this thing that Python calls lambda, and it would be fine if it was called exprfn or something? Or do you think there is really a big problem with using def in the would-be-lambda's scope to give a temporary name for the function?
- kennytilton 8y agoPython's lambda was pretty sad last I looked. Has it caught up with Lisp/Clojure's? And has the BDFL stopped trying to eliminate it altogether? I heard he regretted adding it and wanted to yank it at some point. The D in BDFL looks a lot bigger than the B.
- fulafel 8y agoPython's lambda is unchanged, and it is still included. I have the impression that Guido regrets adding it because of the language-design-aesthetic wart - the recurring "why is it called lambda when it can only define single-expression functions?" "you can just use def in the scope just before use, if you need statements" "but then it's not anonymous!" "just use a temp name" dialog loop.
- kennytilton 8y agoYou know, I completely misapprehended your original query. No, it is fine that GvR called it "lambda". Had he called it experfn we would all translate mentally to "lambda" anyway. I am just sorry Mr. Norvig considers it equivalent to Lisp's, or does not consider it essential to Lispy-ness.
- deleted 8y ago[deleted]
- kazinator 8y agoThe situation is worse: Python doesn't support let. It's so bad that the Hy people aren't able to support let in their Lisp-skin-over-Python. Python's handling of local variables, whereby assignment and binding are conflated, is perpetrating a harm to the education of neophytes. It also means that "x = 42" can never be an "assignment to undefined variable x" error in Python, even when in fact it is that error: the programmer thinks there is an existing x being modified, but there isn't. Or more likely, the programmer thinks that an existing y is being modified which does exist, but made a typo and wrote x instead.