Re:Brython – A Python 3 implementation for client-side web p...
by quietbritishjim on Monday July 06, 2020 @08:26AM
(#23747139)
Yes just call it "callback" if necessary. In the situations I'm imagining, that would still make the code clearer than using one statement to cram in both the definition of the multi-statement function and the use of it in another function.
But maybe we're imagining different situations, and maybe that's the real reason we don't share the same point of view.
Re:Brython – A Python 3 implementation for client-side web p...
by Drew_ on Monday July 06, 2020 @12:02PM
(#23749274)
> It's a callback. What would you name it? "Callback"? You're adding extra complexity for no gain.
Anon callbacks are annoying for anybody who needs to debug performance. I don't see how naming functionality increases complexity either.
Code is meant to be clear. And often times with Python lambdas, there's no reason to give the function a name. It's a callback. What would you name it? "Callback"? You're adding extra complexity for no gain.
But, whatever. It is what it is. Javascript has its own pile of limitations. I was just saying that Python isn't a flawless butterfly.