[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc. (original) (raw)

Paul Moore p.f.moore at gmail.com
Fri May 11 10:40:27 CEST 2007


On 11/05/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

I'm now even more of the opinion that this is too complicated for Python's first generic function system. "If it's hard to explain, it's probably a bad idea."

Hmm. My view is that it is simple to explain, but unfortunately Phillip's explanation in the PEP is not that simple explanation :-(

In my view, too much of the PEP is taken up with edge cases, relatively obscure specialist uses, and unnecessary explanations of implementation details. However, I haven't had any time recently to review it in enough detail to offer a concrete proposal on how to simplify it, so I've kept quiet so far.

I would argue that the PEP could be very simple if it restricted itself to the basic idea. Much of what is being discussed is, in my view, implementation detail - which Phillip finds compelling because it shows the power of the basic approach, but which is turning others off because it's more complex and subtle than a basic use case.

There are many features in Python which are powerful and simple on the surface, but get quite gory when you delve beneath the covers (new-style classes, decorators, generators, for example). That doesn't mean they shouldn't be there.

Paul.



More information about the Python-3000 mailing list