[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020年6月24日 19:37:11 -0700

> e.g., "or", and then I wonder "what does short-circuiting have to do
> with it?". All reuse of symbols carries baggage.
"or" brings an intuition of the execution order of pattern matching, just like 
how people already know about "short-circuiting".
"or" 's operator precedence also suggests the syntax of OR patterns.
As we have "|" as an existing operator, it seems that there might be cases 
that the precedence of "|" is not consistent with it in an expression. This 
will mislead users.
You said "All reuse of symbols carries baggage", I'd say,
All **inconsistent** reuse of symbols carries baggage, but the consistent 
reuse builds good intuitive sense and shows the good taste of designers.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LVZPTOGDX6WCWZZV6T7QDL2MLDRFOXDA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to