Comment on Thoughts on Python 3parentComments−arethuza14yDo you then have to have conditional code in a.__coerce__(b) to check the type of b and do the appropriate thing?−zephyrfalcon14yBasically yes. Although there are ways around it: http://www.artima.com/weblogs/viewpost.jsp?thread=101605−arethuza14yThanks - that looks quite neat.It seems to me there is a big difference between having a language that is truly based on multimethods and one where it is possible to implement multimethods fairly easily - from what I can see Python looks more like the latter.
Comments
Do you then have to have conditional code in a.__coerce__(b) to check the type of b and do the appropriate thing?
Basically yes. Although there are ways around it: http://www.artima.com/weblogs/viewpost.jsp?thread=101605
Thanks - that looks quite neat.
It seems to me there is a big difference between having a language that is truly based on multimethods and one where it is possible to implement multimethods fairly easily - from what I can see Python looks more like the latter.