News for hackers. Stuff that matters.
Re:Pattern matching accepted for Python by pansa2 on Tuesday February 09, 2021 @04:23PM (#26082541)
> The Python steering council has, after some discussion, accepted the controversial proposal to add a pattern-matching primitive to the language.

Controversial is correct. A poll showed a majority (65%) of core developers opposed to this particular proposal, and a plurality (44%) opposed to pattern matching altogether.

https://discuss.python.org/t/gauging-sentiment-on-pattern-ma...

Re:Pattern matching accepted for Python by magnusmundus on Tuesday February 09, 2021 @04:47PM (#26082780)
It's controversial, granted, but I don't think that's a fair reading of the poll. Here's another:

* A majority (56%) of responders want some form of pattern matching.

* Exactly half of all responders, forming nearly 90% of the above majority, are fine with that form being PEP 634.

* There are differing opinions about supporting PEPs, but a supermajority (70%) of those who agree with PEP 634 are fine with it alone.

The fact that it was possible to express more nuance when agreeing with PEP 634 shouldn't diminish their voice against those who reject the idea altogether.

Re:Pattern matching accepted for Python by remram on Tuesday February 09, 2021 @06:22PM (#26083879)
Going with the decision approved by 34% is a bad move. There's nothing wrong with going with it eventually, but this is a sign that as of the poll, there is no consensus and more discussion / more options should happen.

If you decide to act on this 34% anyway, you are only just telling your community that their opinion doesn't really matter. Which might explain why 60% of the eligible voters did not bother.

Re:Pattern matching accepted for Python by magnusmundus on Tuesday February 09, 2021 @06:43PM (#26084064)
> but this is a sign that as of the poll, there is no consensus

agreed. I'm being pedantic on more specific conclusions, but it wasn't the best move. Even if I'm somewhere between "fine" and "happy" about this, personally.

Re:Pattern matching accepted for Python by pansa2 on Tuesday February 09, 2021 @05:35PM (#26083360)
> Exactly half of all responders, forming nearly 90% of the above majority, are fine with that form being PEP 634.

That half includes those who voted for "accept 634 + 640" or "accept 634 + 642", whom I doubt are entirely happy with the decision to accept PEP 634 and reject 640 & 642.

Re:Pattern matching accepted for Python by magnusmundus on Tuesday February 09, 2021 @05:59PM (#26083656)
My point was that you cannot claim "65% of responders opposed this particular proposal". I understand, they're possibly not entirely happy. But the poll is flawed that way: "accept 634" should not mean "reject 640 & 642". I presented my reading as an alternative, but the poll isn't substantive.

That said, I interpret this part:

> PEP 642’s proposed syntax does not seem like the right way to solve the jagged edges in PEP 634’s syntax

to mean that this is merely an initial spec. Those unhappy with the syntax can avoid using it for now, there are no breaking changes. It took a couple iterations to refine the async syntax too, remember, and (IMHO) we arrived at a clean-enough version of it. I have hope!

Re:Pattern matching accepted for Python by thomasahle on Tuesday February 09, 2021 @05:42PM (#26083448)
Maybe adding new syntax should require a 2/3 majority or more.
Re:Pattern matching accepted for Python by thehesiod on Tuesday February 09, 2021 @10:06PM (#26085333)
just wait for a filibuster =)
Re:Pattern matching accepted for Python by adamdusty on Tuesday February 09, 2021 @04:45PM (#26082754)
> 34 voters
Re:Pattern matching accepted for Python by pansa2 on Tuesday February 09, 2021 @05:29PM (#26083293)
Is that not a reasonable sample of the 87 core developers eligible to vote?

https://discuss.python.org/groups/committers

Re:Pattern matching accepted for Python by remram on Tuesday February 09, 2021 @06:18PM (#26083850)
It is a rather poor sample, and a sign that either more people than those 87 should be allowed to vote or there is something wrong with how the vote was conducted.

An explicit "do not care" or "none of the above" option in that poll would have shed more light into this.

Re:Pattern matching accepted for Python by im3w1l on Tuesday February 09, 2021 @07:16PM (#26084334)
If they randomly chose 34 people to poll it would be decent sample. But now it's not a sample at all. The responders are not representative of the non-responders.
Re:Pattern matching accepted for Python by pfalcon on Wednesday February 10, 2021 @05:30AM (#26087531)
The poll is from end of November, there was a lot of discussions since then.