4 ms·
Thank you, this is very interesting. In what way are Python's lambdas restricted? Do they literally have to fit on one line? Do you have to use a separate ver
by montrose 9y ago
Thank you, this is very interesting.
In what way are Python's lambdas restricted? Do they literally have to fit on one line?
Do you have to use a separate version of + to add complex numbers in Python?
Do you prefer loop because it's more concise or because you can say things you can't say in Python? Can you give me a couple examples of things that work better with loop?
(As you can tell from my questions, I don't know much about Python, but as a Lisp hacker I'm curious about other Lisp hackers' view of it.)
- cmcaine 9y agoPython lambdas cannot contain statements, only expressions. Typical python contains a lot of statements, so that's a bit annoying. You can define inner functions and so on, and most of the times that I want to use lambdas it's just because I've been stuck in a language without *-comprehensions for too long. + works fine on complex numbers. I'm not super familiar with the loop macro, but it lets you do both things similar to a python comprehension and to a python for loop. I don't think it does anything you can't do in python.