The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

Marko Rauhamaa marko at pacujo.net
Sun Mar 13 16:12:05 EDT 2016


BartC <bc at 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



More information about the Python-list mailing list