On Sat, May 7, 2022 at 4:39 PM Tin Tvrtković <tinchester@gmail.com> wrote:
Just like Eric, appreciate the work that has gone into this. I am excited by the idea of ADTs since they are a key part of making invalid state unrepresentable, which is amazing for software correctness. However, I would be disappointed if this version of ADTs was accepted since I think basing our ADTs on the Pythonized version of the Rust syntax would be more usable and elegant. The argument given against it is that this would be a more invasive change, which may not matter for us to get it right the first time?

Rust-style enums containing both classes and values would be my ideal scenario. I'm very happy to share actual examples from work where I've wished I had robust ADTs if that would help.

Few people here know Rust. (At least I'll admit that *I* don't know it.) I don't believe actual examples from your work would be that helpful (without knowing Rust I wouldn't be able to understand them). But perhaps you could sketch out a counter-proposal with a Pythonic syntax and some tutorial examples? (More than foo+bar, less than real-world code.) I certainly am not married to the @sealed syntax, it's just the only thing I feel I have a decent understanding of (roughly, "final outside this module").
 
--
--Guido van Rossum (python.org/~guido)