<br><br><div><span class="gmail_quote">On 11/17/06, <b class="gmail_sendername">Talin</b> <<a href="mailto:firstname.lastname@example.org">email@example.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;">
Fredrik Lundh wrote:<br>> Talin wrote:<br>><br>>> I expect to see a series of special-case syntactical work-arounds that<br>>> compensate for the lack of such a feature.<br>><br>> yeah, because the "special-case syntactical work-arounds" are care-
<br>> fully designed to be *usable* for a well-defined group of *practical*<br>> problems. it's about HCI, not CS.<br>><br>> please get over this "all I have is a hammer that my CS teacher told<br>> me to use" mode of thinking; we're designing for humans, not wannabe
<br>> language designers who believe in "the one true mechanism". there are<br>> plenty of other reli^h^h^h^hlanguages for that kind of thinking.<br><br>I don't think that anyone has really answered my fundamental question
<br>yet, which is this: Python is my favorite language, but I use a lot of<br>other languages as well, and there's one feature that I use a lot in<br>those other languages which I miss not having in Python. How is it that
<br>people are so hostile to something that I, and apparently others, find<br>so useful?</blockquote><div><br>Because we have gone down this road on this topic so many times. This is why Guido declared that lambda would not change; it would neither gain nor lose any abilities (except maybe requiring parentheses around its arguments). No one has come up with a good solution, but plenty of people have said, "this is a marvelous feature and as soon as we have it we can do so much!" Well, that's fine but you need to have the good solution before it will be considered. <South Park reference>You need to know what you are going to do with the underpants before you can get rich</reference>.
<br><br>As Fredrik said, we worry more about HCI than CS. Stating multi-line anonymous functions are a great solution to all of these issues is fine from a theoretical point of view. But the key point is that Python puts usability/practicality before purity. In terms of this argument, it is manifesting itself as resistance to this idea without a concrete proposal for the syntax that people actually like. And that is going to be damn hard when every proposal so far for multi-line anonymous functions has been ugly and not very usable.
<br><br>So one must worry about the usability aspect of this proposal first instead of what it might buy us because if it ain't usable then it ain't worth anything in Pythonland. You have the rationale behind wanting this, which is great and is a good start on a PEP. But now you need to come up with how this feature will manifest itself in the code and be usable. Once you have that all wrapped up in a PEP then people will probably be more receptive to discussing this whole matter.