The original (superseded) PEP 622 proposed adding a @sealed decorator so that users could define algebraic data types (ADTs) that static type checkers could verify are `match`ed exhaustively:
- https://peps.python.org/pep-0622/#sealed-classes-as-algebraic-data-types
There is a somewhat fairly-upvoted question about ADTs in Python, indicating interest in this area:
- https://stackoverflow.com/questions/16258553
@sealed would be very valuable towards making ADT usage within Python more type-safe. Is there any historical discussion about why @sealed was dropped from the final pattern matching PEP?
What would be the next steps needed to push this forward? Would writing a new PEP be the next step?
_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: jelle.zijlstra@gmail.com