
On Apr 17, 2020, at 21:01, Steven D'Aprano <steve@pearwood.info> wrote:
On Sat, Apr 18, 2020 at 10:23:59AM +1200, Greg Ewing wrote:
Think football pass, not quiz show pass.
That analogy doesn't help me, especially since I don't know which game of football you are thinking of (soccer, rugby league, rugby union, Gaelic, Australian Rules, Canadian football, gridiron, I probably missed a few...) so I don't know what the consequences of passing the ball will be.
You’re being deliberately obtuse here, and I don’t know why you do this. I think you have a legitimate argument to make against the proposal, but working this hard to find ways to pretend not to understand obvious things just so you can raise irrelevant arguments against every individual sentence makes it hard to see what actual substantive argument against the actual proposal is. The analogy is obvious—the `pass` statement means not doing anything when you have a chance to do something, like passing your turn in a quiz show; Greg’s proposed `pass spam` argument syntax means giving spam to the callable, like passing the ball to a teammate in soccer, and gridiron, and the many minor variations on those games, and the raft of similar games, and even wildly different games like basketball. If “pass the ball to a teammate” means anything at all in a team ball game, it always means giving control of the ball to the teammate by moving the ball to them. And you know that. And you also know that there is no chance that Greg has found some obscure game also called “football” where “pass the ball to a teammate” actually means “write the teammate’s name on the ball and bury it at a full moon”, and he’s decided to refer to that game as just “football” so he can trick you into thinking he means soccer or gridiron so you’ll make the wrong argument, because then he’ll win an automatic victory and we’ll all have to agree to his proposal even if we hate it, because that’s not how human discussions work. If you hadn’t pretended not to understand the obvious analogy, you could have used it to make your actual counterpoint (or at least what I’m _guessing_ your counterpoint is): OK, so the `pass spam` argument syntax is like football passing, giving spam to the callable. But just using `spam` as an argument already means that—in fact, we already call it “passing spam to the callable”. So it’s just being more explicit about the exact same thing we’re already saying. What does that add? How is anyone supposed to understand `pass spam` as “don’t just pass spam like usual, pass it as a keyword argument with name 'spam'”? At best, that sounds like the `new` keyword in JavaScript (where `new Spam(eggs)` means “don’t just create a new Spam by calling its constructor with eggs, also give it a blank object for the hidden this parameter”), which most people have a hard time learning and understanding but eventually sort of get the hang of doing, which is not usually what you’re aiming for with a language feature.