Python from Wise Guy's Viewpoint

Pascal Costanza costanza at web.de
Sun Oct 19 17:20:54 EDT 2003


Joachim Durchholz wrote:

> Oh, you're trolling for an inter-language flame fest...
> well, anyway:
> 
>> 3. no multimethods (why? Guido did not know Lisp, so he did not know 
>>    about them) You now have to suffer from visitor patterns, etc. like
>>     lowly Java monkeys.
> 
> 
> Multimethods suck.

Do they suck more or less than the Visitor pattern?

> The longer answer: Multimethods have modularity issues (if whatever 
> domain they're dispatching on can be extended by independent developers: 
> different developers may extend the dispatch domain of a function in 
> different directions, and leave undefined combinations; standard 
> dispatch strategies as I've seen in some Lisps just cover up the 
> undefined behaviour, with a slightly less than 50% chance of being 
> correct).

So how do you implement an equality operator correctly with only single 
dynamic dispatch?


Pascal





More information about the Python-list mailing list