On Tue, Apr 28, 2020 at 12:40:34PM +1200, Greg Ewing wrote:

> I don't think "once" is a bad name, but we shouldn't kid
> ourselves that it will be intuitive or discoverable to
> anyone who isn't familiar with Eiffel.

I'm not particularly wedded to "once" specifically, but honestly I think 
that it is silly to say that you have to be familiar with Eiffel to 
recognise the connection between running a function once and the word 
"once".

https://davidwalsh.name/javascript-once

Are JS devs know for their familiarity with Eiffel? :-)

At least two other Javascript libraries, Underscore and Rambda, call 
this function "once":

https://stackoverflow.com/a/12713611

JQuery calls a related function "one", although the functional semantics 
are not quite the same as we're discussing:

https://api.jquery.com/one/

Coming back to Python, here's someone who calls their version 
"run_once":

https://stackoverflow.com/questions/50904087/run-a-function-only-once-during-runtime-in-python


-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/XEVP2KLYXDA7VMT2P3RQQ3Q4WAWRDRTS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to