[Python-ideas] Syntactic sugar to declare partial functions

Steven D'Aprano steve at pearwood.info
Fri Aug 10 03:09:59 EDT 2018


On Thu, Aug 09, 2018 at 01:32:00PM -0500, Abe Dillon wrote:
> I'd like to push for the less jargon-y `func.given()` version if this gains
> traction. Not only is it shorter, it's a much more common term with a clear
> meaning. 

It's a clear, *generic* meaning that doesn't have any association with 
partial application.

https://www.google.com/search?q=function+given

We'd be trying to create that association from scratch.


> Words like 'partial', 'curry', 'lambda', and 'closure' are fine
> for text books, published papers, and technical discussion,

And programmers.

Programming is a technical skill with its own jargon. Classes, 
inheritence, exceptions, trampolining, processes, threads, protocols, 
imports, decorator, builders... we are happy with all those, why should 
we fear partial and lambda?


> but I think
> they would (or do in the case of 'lambda') harm Python.

That's an extreme overreaction.

Do you mean to imply that there are people who looked at Python, loved 
the language, but decided to use something else because they didn't like 
the choice of the keyword "lambda"?

If not, in what way is Python harmed? Would it be faster if the keyword 
was "function", or use less memory, or more expressive?

Remember that to millions of programmers in the world, "function" is 
just as much an obscure foreign piece of jargon they have to memorise as 
"lambda" is to English-speakers.


-- 
Steve


More information about the Python-ideas mailing list