<br><br><div><span class="gmail_quote">On 26/03/2008, <b class="gmail_sendername">Nick Coghlan</b> <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think if I come across a keyword I didn't know in a language I was<br> learning, I'd look it up to find out what it means. </blockquote><div><br>Yes but it doesn't look like a keyword, does it? It looks like a letter of the greek alphabet to me. :-) The first time I came across lambda I looked for the definition of the variable "lambda" in the whole program and wondered about that strange syntax: "variable x,y: x+y".<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Lambda calculus is a<br> well established field of mathematics, so it's a perfectly valid name<br>
for the construct.<br></blockquote><br>In my university in Sweden lambda calculus is never taught neither in pure nor applied math. It is only a part of a course in computer science applied to linguistics. The word "lambda" however is used all over the place as an eigenvalue, or a wave length, or parameter, or Lamé coefficient in many of our courses.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">So don't use it. Use a named function instead. Then it will be even more<br> of a pleasure to read, because the name you choose will tell the reader<br>
what the function is for. You can even attach a docstring to make it<br> really obvious.</blockquote><div><br>I don't use lambda. I never ever use it. But people use it. I am talking about beginners in front of a code where lambda is used. I am also talking about a beginner writing "lambda = 3." and getting a weird syntax error message.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> > I thought that the upcoming of python 3000 would be a good opportunity<br> > to change this name but since few or no python beginners or newcommers<br>
> are reading this mailing list I don't think that I will get a lot of<br> > support here. :-)<br> <br> <br>For a long time, lambda functionality wasn't going to exist in Py3k at<br> all. It certainly isn't going to get enough care and attention to<br>
warrant Guido expending the mental energy needed to arbitrarily choose a<br> new name, and anyone else going through the code and docs changing it.<br> <br> Python beginners and newcomers should be steered completely clear of<br>
anonymous functions anyway.</blockquote><div><br><br>They can't. lambda is used all over the place. I'm teaching python for scientific computing and I don't teach lambda but I have to tell students never to use the name "lambda" as a variable.<br>
<br>I also agree with the idea that the lambda construct should rather use
a keyword free syntax like "x -> 3*x" or something of that kind.
That would be gorgeous.<br> </div>Sorry if I posted this in the wrong mailing list. I was not aware of the python-ideas mailing list but you will sure get messages from me over there as well. :-)<br><br>Thanks for all the responses.<br>
<br>== Olivier<br></div><br>