<div dir="ltr"><div>[Chris Angelico] </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">> The whole point of a programming language is to bridge the gap between<br></span><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">> machine code and natural language (in Python's case English, as with most<br></span><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">> other languages). It's to make reading and writing code easier through<br></span><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">> abstraction, not to create ivory towers through the use of esoteric jargon.<br></span><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">> It's not supposed to make a cool kids club for people privileged enough to<br></span><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">> study CS in college. At least that's not my goal.</span><span class="gmail-im" style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">The whole point of a car is to make driving easier through abstracting<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">away the internal details of petrochemical propulsion, but if someone<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">says "I don't want to know about 'gears' or 'brakes' or any of these<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">technical terms", you wouldn't want them driving on the roads you're<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">on. There is a certain level of comprehension that you can't avoid.<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(If you don't know anything about how to use a car, you can still ride<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">in one, but you can't drive it; and you don't need to understand about<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">anonymous functions in order to operate a computer, but you'll need<br></span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">them to program effectively.)</span></blockquote><div><br>This was originally in response to Bruce Leban's assertion: "<span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">If using lambda as a keyword leads people to go and learn about lambda calculus that is a good thing."<br><br>Are you saying that knowing "what lambda calculus is" is as important to programming in Python as knowing "what breaks are" is to driving? If so, I don't think that analogy holds water. I don't think lambda calculus is fundamental to knowing how to write a program. I don't even think anonymous functions are fundamental to writing a program. I think a programmer could go their whole life without ever knowing what a lambda expression is and still manage to write plenty of very useful code.<br><br>It seems to me like the whole point of this discussion has turned into getting me to repent and profess my undying love for lambda expressions. I'm sorry to disappoint.<br><br>Maybe we should split off this discussion into a thread where people can keep badgering me to come up with an objective proof that Python's lambda expressions are not the best implementation possible. Then, at least, we can stop polluting this thread with this tangent.<br><br>It doesn't seem to matter how many times I try to point this out, but my original comment should be read as: "I like Steven's idea. I prefer `given` to `partial`." I'm sorry I even brought up lambda. I'm truly sorry to all those who wanted to seriously discuss alternatives to functools.partial.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 13, 2018 at 2:17 PM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Aug 14, 2018 at 5:08 AM, Abe Dillon <<a href="mailto:abedillon@gmail.com">abedillon@gmail.com</a>> wrote:<br>
> The whole point of a programming language is to bridge the gap between<br>
> machine code and natural language (in Python's case English, as with most<br>
> other languages). It's to make reading and writing code easier through<br>
> abstraction, not to create ivory towers through the use of esoteric jargon.<br>
> It's not supposed to make a cool kids club for people privileged enough to<br>
> study CS in college. At least that's not my goal.<br>
<br>
</span>The whole point of a car is to make driving easier through abstracting<br>
away the internal details of petrochemical propulsion, but if someone<br>
says "I don't want to know about 'gears' or 'brakes' or any of these<br>
technical terms", you wouldn't want them driving on the roads you're<br>
on. There is a certain level of comprehension that you can't avoid.<br>
(If you don't know anything about how to use a car, you can still ride<br>
in one, but you can't drive it; and you don't need to understand about<br>
anonymous functions in order to operate a computer, but you'll need<br>
them to program effectively.)<br>
<span class=""><br>
> As someone who has taught Python professionally, I can say that there is a<br>
> strange mental block regarding lambda expressions. Pretty much every student<br>
> I've had has struggled with lambda expressions, even those who grasp<br>
> similarly complex constructs like decorators with ease. This includes<br>
> students who learned english as a second language. I can only attribute that<br>
> to the word 'lambda' being confusing as hell.<br>
<br>
</span>As someone who currently teaches both Python AND JavaScript<br>
<span class="">professionally, I can say that there is a strange mental block<br>
</span>regarding anonymous functions, and it's nothing to do with the word<br>
"lambda". In JavaScript, anonymous functions are created with the word<br>
"function" (same word as is used for declared functions), and there<br>
are just as many points of confusion as there are with Python.<br>
<div class="HOEnZb"><div class="h5"><br>
ChrisA<br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</div></div></blockquote></div><br></div>