[Python-Dev] PEP 443 - Single-dispatch generic functions (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Thu May 23 10:24:53 CEST 2013


Le Thu, 23 May 2013 00:31:38 -0700, Glenn Linderman <v+python at g.nevcal.com> a écrit :

I suspect the point was not that add can be described as doing single dispatch (it can't), but rather that add could possibly be implemented in terms of lower-level functions doing single dispatch. If that was the point, perhaps the next level point is trying to be that single dispatch is a sufficient mechanism that can be augmented (as above) to handle more complex cases.

This is true, but as it is of everything Turing-complete. Generic functions don't add anything that you can't already do manually (for example with custom registries) :-)

Regardless, I also agree that single-dispatch is much easier to reason about, and good enough for now.

Regards

Antoine.



More information about the Python-Dev mailing list