
On Fri, Apr 17, 2020 at 11:39:41PM -0700, Andrew Barnert wrote:
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 really am not.
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
I understand the proposal. I even said I was sympathetic to it. I don't understand the use of "pass" as a keyword to mean "auto-fill the argument value". It makes no sense to me, and Greg's analogy just makes it seem even more nonsensical. I think that "import" would make a better keyword, since we could at least say "you import the parameter's value from the surrounding scopes". (Note: I am not actually proposing "import" here as a good keyword to use. It's a terrible, awful keyword to use here. But at least there's some connection, even if it is awfully weak.) We are proposing something which actively modifies the meaning of an identifier in a function call. It changes the bare identifier (which would otherwise be evaluated and passed as a positional argument) into a keyword argument with value taken from the surrounding scope(s). How is this even remotely similar to any meaning of the word "pass", whether you are passing your turn in a quiz show, or passing a football, or a `pass` statement in Python, or some other meaning of the word? This is not a rhetorical question. American gridiron is, from the perspective of people outside of North America, a bizarre game: https://qz.com/150577/an-average-nfl-game-more-than-100-commercials-and-just... For all I know, they change the ball from one kind of ball to a different kind of ball after throwing it, for reasons. But I don't actually know that Greg had gridiron in mind. Maybe he's a gaelic football fanatic and there's some rule in gaelic football that applies after a pass. Who knows? Not me, I'm not a mind reader. The analogy doesn't make sense to me, but giving Greg the benefit of the doubt here, rather than dismissing it as a worthless non-sequitor, I'm allowing for the possibility that it does actually make sense from his perspective, and if I knew what he is thinking of it might make sense to me too. That's how analogies work. But honestly, being attacked by you like this, I'm kinda wishing I had just dismissed Greg's suggestion as too stupid for words instead of trying to encourage him (in my clumsy manner) to explain it.
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.
Am I doing that?
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;
Given that Greg says this is nothing like passing in a quiz show, that doesn't really matter. But for the record: Passing in a quiz show is an explicit action. If you want to do nothing, you can just sit still and say nothing until your time runs out. Passing means to explicitly hand over the turn to the next person. Or to request the next question without giving an answer to the current question. It depends on the quiz show.
Greg’s proposed `pass spam` argument syntax means giving spam to the callable,
All arguments are given to the callable. This is another explanation that explains nothing. Greg's example was `f(spam, pass eggs, ham)`. So what's the difference between giving spam to the callable, and giving eggs to the callable? They are both passed to the callable. I already made this observation in my earlier response. I trust you have read it, since that's the email you are responding to.
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.
Yes, I know that. And I still don't see how it is analogous to what we are proposing here. We pass spam to f, we pass eggs to f, we pass ham to f, but somehow only eggs justifies the keyword "pass" and you claim that it is obvious why and that I'm feigning confusion and being "deliberately obtuse".
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”,
That's some mighty impressive straw-manning there. What I actually said was "I don't know which game of football you are thinking of" (which is true), "so I don't know what the consequences of passing the ball will be" (which is also true). In netball, when you pass the ball, the person who receives it has to immediately stop dead. In Australian Rules, once you have passed the ball, anyone tackling you has to immediately release you. In Rugby, you can only pass the ball backwards. There are all sorts of rules that might apply. How am I supposed to know what rule Greg is thinking of when I don't even know which code of football he is thinking of?
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.
That's an impressive rant. Maybe you should settle down a bit and consider that I'm not doing what you accuse me of, that my confusion isn't malicious play acting, but I *genuinely* do not understand this analogy, that it isn't as "obvious" as you imagine.
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”.
Dammit, I wish I had made that argument! Oh wait, *I did*. -- Steven