[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis

2020年11月23日 14:36:10 -0800

On 24/11/20 9:31 am, Brian Coleman wrote:
In my opinion, the object oriented solution to this problem is to use the 
visitor pattern.
Which is a good thing only if you believe that OO solutions are
always better than non-OO ones.
IMO, the visitor pattern is a workaround for when your language
doesn't permit introspection on types. It's unnecessary in
Python and better avoided.
--
Greg
_______________________________________________
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/XZ2EKVMQXZ5DEV5TWLBKGNU5JWFMIX4Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to