Guido van Rossum
Dec 23, 2019 · 1 min read

For incidental uses like your “exotic” example, having to name the callback is not much of a burden. The need to name callbacks (or the weakness of lambdas) becomes a problem only when callbacks become a major paradigm, like they have become in JavaScript. Which is no wonder, since JavaScript’s earliest origins were all about callbacks. (Does anyone still use onclick=...?)

But of course there’s a chicken-egg issue — presumably new APIs are more likely to require callbacks in JavaScript than in Python, because in JavaScript callbacks are such a major paradigm already. So it’s hard to compare the merits of the two approaches.

And perhaps callbacks are more useful in a UI world?

More from Guido van Rossum

More from Guido van Rossum

Building a PEG Parser

More from Guido van Rossum

More from Guido van Rossum

PEG Parsers

1.99K

More from Guido van Rossum

More from Guido van Rossum

Left-recursive PEG grammars

182

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade