Asun Friere wrote:
On Dec 10, 2:00 pm, Carl Banks <pavlovevide...@gmail.com> wrote:

On Dec 9, 5:02 pm, Asun Friere <afri...@yahoo.co.uk> wrote:


On Dec 9, 7:08 pm, Carl Banks <pavlovevide...@gmail.com> wrote:

What if the object is a string you just read from a file?

How do you dispatch using polymorphism in that case?

This would be a pertinent question, were I advocating that _all_
switch statements should, or even can, be replaced with "dispatch
using polymorphism."

Then why did you claim that a decent OO should never have a switch
statement then?
You argued that a decent language OO should never
have a switch statement because polymorphic dispatch is the right way
to handle it in OO languages, which implies that polymorphism can and
should take the place of any switch statement.

That is a misreading.  I wrote... [snip]

You wrote, and I quote, "For which reason python has no 'case'
statement and why *no decent OO language should* ." [emphasis added]

Just to be clear.

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to