[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

Guido van Rossum guido at python.org
Sat May 12 22:03:59 CEST 2007


On 5/12/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> The emerging consensus appears to be that everything relating to
> method combination and Aspects should be a second PEP, [...]

Yes, please.

I've just finished reading linearly through the version of PEP 3124
that's currently online, and the farther I got into the method
combining and Aspects section, the stronger the feeling I had that
there's just too much stuff here, and that it's all quite esoteric.

Some other feedback on the PEP (I will be awaiting your split-up
version before commenting in detail):

- Please supply a References section, linking to clear explanations
(and sometimes source code) of the various systems you mention (e.g.
Haskell typeclasses, CLOS, AspectJ, but also PEAK, RuleDispatch and so
on). Even in this age of search engines you owe your reader this
service. (And in the past I've had a helluva time finding things like
those "656 lines" in peak.rules.core!) Every time you mention a
concept that I don't know very well without a reference, I feel a
little stupider, and less favorably inclined towards the PEP. I
imagine that's not just my response; nobody likes reading something
that makes them feel stupid.

- Please provide motivating use cases beyond the toy examples for each
proposed feature. I am really glad that you have toy examples, because
they help tremendously to understand how a feature works. But I am
often stuck with the question "why would I need this"?

- Expect pushback on your assumption that every function or method
should be fair game for overloading. Requiring explicit tagging the
base or default implementation makes things a lot more palatable and
predictable for those of us who are still struggling to accept GFs.

- Some of the examples of method overloading in classes look really
hard to follow and easy to get wrong if one deviates from the cookbook
examples. (Though this may be limited to the "advanced" PEP.)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list