Typing syntax for union looks a bit like sets, might be a bit confusing.
High-level description of the feature
Use same union syntax as Python, Typescrpt (other?) instead of current, so:
def x: {A, B, C ...} := ... changes to def x: A | B | C := ....
This also has the added benefit of being more familiar to uses of those languages.
Plus, it just looks better, now we don't mistake it for a set accidentally.
Description of potential implementation
[ ] Update parser to deal with new syntax.
[ ] Update docs (BNF) to reflect change.
[ ] Also change Python output to use this syntax as per PEP 604.
Current Issue
Typing syntax for union looks a bit like sets, might be a bit confusing.
High-level description of the feature
Use same union syntax as Python, Typescrpt (other?) instead of current, so:
def x: {A, B, C ...} := ...
changes todef x: A | B | C := ....
This also has the added benefit of being more familiar to uses of those languages. Plus, it just looks better, now we don't mistake it for a set accidentally.
Description of potential implementation