News for hackers. Stuff that matters.
Re:Why Python? by wyuenho on Saturday October 23, 2010 @09:11AM (#1823396)
Python's lambda is not broken, it's just that the notion of a (progn) from Lisp doesn't exist in Python, so Python's lambda is a lot harder to use because for anything more complicated then 1 expression, you'd have to define a fully named function somewhere. For the most part this isn't an issue because you probably wouldn't want to have more then 2 or 3 expressions in a lambda anyway.

Granted, a lot of languages like Ruby, Lua, ML and even CoffeeScript have arguably even cleaner syntax then Python, but none has as vast a community and quality libraries that mirror Python. In choosing a language, the language itself matters, but the ecosystem equally matters IMHO.

Re:Why Python? by vog on Saturday October 23, 2010 @09:24AM (#1823421)
> Granted, a lot of languages like Ruby, Lua, ML and even CoffeeScript have arguably even cleaner syntax then Python

But Python has still the cleanest standard API. At least for me, that's what made me switch from Ruby to Python in the past.

Re:Why Python? by silentbicycle on Saturday October 23, 2010 @09:39AM (#1823451)
They're also much cleaner in languages with expression-oriented rather than statement-oriented semantics -- languages where the result of a function is implicitly the last value in it, without needing a return statement.
Re:Why Python? by gaius on Saturday October 23, 2010 @11:03AM (#1823609)
But you can nest function definitions, so in practice the lack of a multi line lambda just means just prior to where you use it you'd just have a "def f ...".