
Rob Cliffe via Python-ideas writes:
On 07/12/2021 18:22, Stephen J. Turnbull wrote:
For values of "hard" == "non-trivial but mostly bikeshedding". I don't think it will be that much harder to get through than Chris's.
And in theory it could be easier: it could be implemented with a new builtin such as "quote_expression" that takes a string, and thus needing no new syntax. I actually don't think that will pass, too clumsy to be of practical use. Although it might fly on the same logic as function annotations did: we add the instance flag that says that "this object is a thunk to be evaluated in the current context" and the code in the interpreter that's needed to use it, and postpone syntax until somebody comes up with a really good proposal.
In fact, we could combine this strategy with Steven d'Aprano's proposal for a thunk object, in which case Chris doesn't need syntax himself. I'm sure he won't like that, but it's an idea.
All this seems like a matter of opinion, on which we shall have to disagree. But ...
"All"? The suggestions about implementation are eminently practical, all are in use in Python already, proposed in accepted PEPs, or proposed by others in this thread for implementing Chris's syntax. The only disagreeable opinions there are about what might be acceptable to other people, but I thought I was pretty conservative on those counts.
And there seems to be no likelihood of anyone tackling it soon.
There's no way to judge that. David Mertz might post a PEP tomorrow for all you know.
Surely you're pulling my leg.
Of course not. I have no reason to believe humor would sway you. > If he had something in the pipeline that would greatly strengthen > his argument, we would have heard about it by now. The point of my argument above is that all the parts are there, "all" we need is a good syntax and a coherent theory of scoping. Those are "flash of inspiration" kinds of thing. It's a good question whether Chris will beat the general deferred advocates to an acceptable syntax, since there are quite a few people who dislike his preferred syntax. I'd give the edge to Chris, since a fair number of people like his idea and I'm sure he'll accept any syntax the SC strongly prefers, and several have been proposed. But it's not a sure thing, since quite a few smart people are completely unexcited by Chris's proposal. The SC might very well go the same way. They might stomp on general deferreds, too -- won't know until we get there.
That's a strawman. The argument is not "Your proposal is good, but not perfect, so we reject it."
That IMO is exactly the argument.
So much for your opinion. I assure you, that is NOT my argument. So if it is anybody's argument, there's no "the" there. > It's like saying "I won't buy a car today because in 10/20/50 years > time I can probably buy a driverless one". I agree that's a good analogy to your mischaracterization of my argument (which mostly has been made by others; important points have been made by David Mertz, Brendan Barnwell, Steven d'Aprano, and likely several others). But it is a mischaracterization, so your analogy is pointless.
Er, what reasons [for opposing the PEP]?
Read the thread. There are a number of them there.
You want *Chris* to implement deferred-evaluation objects?
Sure, I'll take a pony if it's offered. But what matters here is that Chris wants to, if he wants my support and David's. I imagine he considers that a nice-to-have but he'll do without rather than implement the general deferred object. > Hasn't he done enough? No, not enough to get better than -1s from me, David, and some others. Whether he's channeling the SC, or we are, remains to be seen. > You want him to produce a second PEP and a second reference > implementation in competition with his first one? As above. It's been done before, for similar reasons (ie, to make the BDFL, PEP Delegate, or SC happy).
Surely if other people think it's a good idea, it's up to *them* to prove it.
I think you misunderstand how open source projects work. There's always a gatekeeping mechanism in projects that involve more than two or three developeres; in Python it's the SC. (Note: not me or David or Brendan, nor all of us together.) People will do what they consider unnecessary work to get through the gate. Who does the work and how much is done depends on how much each party wants the feature. Whether Chris should do it depends on how much Chris wants *some* kind of deferred evaluation for actual arguments, how much the SC prefers a general deferred to Chris's default- arguments-only deferred, and whether they think having both is a bad idea for some reason. But the "good idea" of general deferreds is only marginally relevant to our -1s. It's those -1s that constitute the main issue for Chris, since they're a noisy signal that the SC might think as we do. > If an architect comes up with a plan to redesign a city centre, > would you say to him "Now produce a completely different plan, just > to show that your first one wasn't great"? No, I wouldn't say that. But I will say you need to come up with analogies that capture your opponents' ideas, instead of strawman arguments. Cheers, Steve