On 13/03/2016 20:12, Marko Rauhamaa wrote:
BartC <b...@freeuk.com>:

Exactly why having ready-made solutions is preferable to everyone
hacking their own solutions to switch.

A developer friend of mine once said insightfully that the point of OO
is getting rid of switch statements. IOW, most use cases for switch
statements are handled with virtual functions.

The most significant exception in my experience is message decoding,
where switches/ifs cannot be avoided.


Marko


http://c2.com/cgi/wiki?SwitchStatementsSmell

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to