[Python-ideas] Syntax for passing lambdas to functions
Joshua Landau
joshua at landau.ws
Fri Feb 28 01:52:32 CET 2014
On 27 February 2014 23:47, Haoyi Li <haoyi.sg at gmail.com> wrote:
>> Please admit that this is way, way prettier.
>
> If it's just a matter of prettyness, why not just alias lambda as λ
As much as this makes sense, and ignoring the downsides of non-ASCII
characters¹, I have some comments:
I disagree about λ being prettier, much as one writes "myfunc (x,
y) = (y, x)" in Haskell instead of "myfunc = \(x, y) -> (y, x)"².
This reminds me that we've had this argument shot down before, so
chances are I'm defending a dead horse here.
¹ You might notice that I do so in my EMails, but only because Alt-Gr
(on Linux) makes specific graphemes easy to reach.
² I don't actually know Haskell.
More information about the Python-ideas
mailing list