[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-12-27 Thread Paul Sokolovsky
Hello, On Sun, 27 Dec 2020 14:10:59 +0100 Dave Halter wrote: > I'm late, but I still wanted to add that I share some of the criticism > that Mark has brought up. > > I'm in love with Rust's pattern matching, so I feel like I'm not > against pattern matching generally. However I feel like while

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-12-27 Thread Dave Halter
I'm late, but I still wanted to add that I share some of the criticism that Mark has brought up. I'm in love with Rust's pattern matching, so I feel like I'm not against pattern matching generally. However I feel like while the PEP is well written, there are some things that it does not tackle:

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-10-31 Thread Nick Coghlan
On Sat, 31 Oct 2020 at 00:44, Mark Shannon wrote: > Should match be an expression, or a statement? > -- > > Do we want a fancy switch statement, or a powerful expression? > Expressions have the advantage of not leaking (like comprehensions in > Python

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-10-30 Thread Greg Ewing
On 31/10/20 7:22 am, Mark Shannon wrote: On 30/10/2020 4:09 pm, Brandt Bucher wrote: Anyone who reduces pattern matching to "a fancy switch statement" probably isn't the right person to be discussing its semantics and usefulness with. Pattern matching is a fancy switch statement, if you

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-10-30 Thread Chris Angelico
On Sat, Oct 31, 2020 at 5:31 AM Mark Shannon wrote: > > It's right here that you lose me. Anyone who reduces pattern matching to "a > > fancy switch statement" probably isn't the right person to be discussing > > its semantics and usefulness with. It seems that some people just can't > >

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-10-30 Thread Paul Moore
On Fri, 30 Oct 2020 at 18:30, Mark Shannon wrote: > > Hi Brandt, > > On 30/10/2020 4:09 pm, Brandt Bucher wrote: > >> Can we discuss whether we want pattern matching in Python and the broader > >> semantics first, before dealing with low level details? > > > > This is a huge step backward. These

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-10-30 Thread Mark Shannon
Hi Brandt, On 30/10/2020 4:09 pm, Brandt Bucher wrote: Can we discuss whether we want pattern matching in Python and the broader semantics first, before dealing with low level details? This is a huge step backward. These discussions have already taken place, over the last 10 years. So

[Python-Dev] Re: Thoughts on PEP 634 (Structural Pattern Matching)

2020-10-30 Thread Brandt Bucher
> Can we discuss whether we want pattern matching in Python and the broader > semantics first, before dealing with low level details? This is a huge step backward. These discussions have already taken place, over the last 10 years. Here's just a sampling: -