[Python-ideas] Syntactic sugar to declare partial functions

Steven D'Aprano steve at pearwood.info
Mon Aug 13 19:13:07 EDT 2018


TL;DR

- I accept that there've been a few cases where I could have 
  chosen my words better, and consequently I've rubbed Abe
  the wrong way; sorry about that Abe, as I said earlier (and
  I meant it) I have no grudge against you.

- The most important technical issue I wanted to get from my
  discussion with Abe has been solved, I now believe that I
  understand what harm he feels was caused by chosing the name
  "lambda" over some alternative.

- Namely (if I have understood Abe correctly) its the lost
  opportunity to have a better name.

- Which seems to me to be so slight a harm that I don't think
  it gives us any guidance at all as to whether "partial" or 
  "given" would make a better name for this proposed feature.

(So much drama for so little gain.)

Even after all these years of seeing people over-react to minor 
perceived slights (whether real or not), I cannot believe how quickly 
this one has degenerated into antagonism and over-reaction, and over so 
little. It certainly has not been helped by people fanning the flames of 
argument by calling this a "toxic forum".

We should assume good faith. Before flying off the handle and taking 
offense, we should assume misunderstanding (on either or both party), 
accidental poor choice of wording, or merely robust debate rather than 
malice. We ought to be careful about making assumptions about people's 
motives from their responses. Email is a notoriously bad medium for 
judging people's motivation.

The rest that follows is detail, responding to a few specific points 
which I deem relevant but not essential.

*

*

*

On Sun, Aug 12, 2018 at 10:31:36PM -0500, Abe Dillon wrote:

> I explained my position on lambda as fully as I care to in my response to
> Niel if you care to read it.


I did read it. Just because I didn't respond to it directly doesn't mean 
I didn't read it.

You say you object to the name, but then suggest a change that is 
idependent of that name. You talked about the placement of the function 
signature, wanting to put the body of the lambda first, before the 
parameter list. That has nothing to do with the choice of name "lambda", 
which is what I thought you were objecting too as it was too jargony. 
Moving the parameter list to the end of the expression is idependent of 
the keyword "lambda".


> I only think lambda harms Python in so far as
> there were better alternatives that communicate their intention much better
> and are more readable. That's an opinion. If you must know, i'm not
> currently frothing at the mouth as I state it.

Nobody has accused you of frothing at the mouth.

You seem to be talking about "opportunity costs" in a sense. Its not so
much that the name lambda does harm in and of itself, but that another
choice could be *even better* and do *even more good*.

Is that a reasonable description of your position?


> My original post was agreeing with you. Supporting your own words. If you
> don't agree with my position that we should avoid jargon for jargon's sake,

And don't imagine for a second I'm not aware of the irony.


> then what exactly did you mean when you said, "although possibly a less
> jargon name would be nicer?" Can you articulate why you think it might be
> nicer to use a less jargon name?

I meant exactly what I said. *Possibly* a less jargon name would be
nicer. Or possibly not. I was opening the issue up for further
discussion, not nailing my colours to the mast as champion for the idea.


> What about my saying it all of a sudden
> makes it an "extreme overreaction"?

Now you're quoting me out of context. It was your claim that the name
"lambda" does harm to Python that I described that way.

In hindsight, I wish I had left off the adjective "extreme".


[...]
> Notice: I never said "real, significant, non-trivial harm" anywhere in this
> entire discussion.

In fairness, you did say "minor" harm, so I'll accept that my emphasis 
on real significant etc was questionable.

I don't know where the boundary between minor and trivial lies and I 
think people can disagree on this point. So I'll accept that here I read 
more into your words than were actually there. Sorry about that.


[...]
> [Steven D'Aprano]
> 
> > How can we insist that 3/4 of the world learn English words to use Python
> 
> Do you really think that 3/4 of the world learns English just to write
> Python?

That's not what I wrote. There's a difference between these two 
positions:

- needing to learn to read English words to use Python;

- using Python is the only reason to learn English.

I said the first, not the second.


> [Steven D'Aprano]
> 
> > ...if we aren't even willing to move out of our own comfort zone to
> > the extent of learning accurate jargon terms from our own profession?
> 
> Very few of us are computer scientists by profession. That's not even where
> 'lambda' comes from. In computer science, it's called an "anonymous
> function". "lambda" comes from lambda calculus.

Where it comes from is not really important. Words change and are 
co-opted in new contexts. "Lambda" is rapidly become a standard 
programming term, and language agnostic, e.g.:

https://martinfowler.com/bliki/Lambda.html



-- 
Steve


More information about the Python-ideas mailing list