The Voidspace Techie Blog

Gravatar Or you can just use RuleDispatch ;]

http://www-128.ibm.com/developer...rary/l-cppeak2/


Gravatar or maybe simplegeneric
http://cheeseshop.python.org/pyp...i/ simplegeneric


Gravatar I like this a lot, and it would be interesting to see how well it performs against RuleDispatch, since its simpler.

might it be possible to use a decorator syntax instead of the numeric approach ? i.e.

@overload
def __init__(...)


Gravatar Decorators would probably work, and would avoid the numeric approach - but you'd need to decorate every overloaded method (my approach works with a single metaclass declaration).

There might also need to be some trickery to avoid similarly named methods from different classes clashing, this approach contains it all within the class declaration.

I like the *effect* of the Peak Predicative dispatch, but not the strings used for the type specification.


Name:

Email:

URL:

Comment:  ? 

 

Commenting by HaloScan