proposed syntax for multiline anony-functions (hopefully?)

Marko Rauhamaa marko at pacujo.net
Sat Aug 23 03:37:11 EDT 2014


Dan Stromberg <drsalists at gmail.com>:

> Please don't add multiline lambdas to Python.

Agree.

> Multiline lambdas give rise (in a big way) to the
> computer-language-equivalent of run-on sentences.

Lambdas are perfect in Scheme because they are idiomatic in it. They
carry a visual meaning and flow nicely with the parentheses and the
indentation.

Multiline lambdas would look out of place in Python. Also, they don't
buy you anything functionality-wise or expressivity-wise.

Lambdas are visually absolutely horrible in Java (which doesn't need
them) and C++ (which is in dire need of them).

However, it would appear lambdas are all in the rage among programming
languages, and I could think of far worse fads (XML, shudder). So it may
be that Python will eventually have to give in to multiline lambdas
because of the marketing pressure.


Marko



More information about the Python-list mailing list