[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
Guido van Rossum
guido at python.org
Mon May 14 21:51:23 CEST 2007
On 5/14/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> I simply said the plan for Ruby was suggestive that method
> combination is worth looking into further, because in the case of
> Ruby, they already had single-dispatch generic functions, so the
> addition suggests combination is no longer considered a YAGNI there.
> As I said, however, I unfortunately haven't been able to find any
> documented rationale for the proposal -- implying that I have no idea
> whether Matz' decision is more comparable to jumping off a cliff or
> packing a swimsuit, and thus cannot give any actual recommendation
> with respect to such. :)
So how do you know what's going on there is the same as what's
apparently going on here, i.e. some folks have fallen in love with
CLOS or Haskell or whatever and are pushing for some theoretical ideal
that has no practical applications?
> Meanwhile, I've been told repeatedly that TurboGears makes extensive
> use of RuleDispatch, and my quick look today showed they actually use
> a custom method combination, but I haven't yet tracked down where it
> gets used, or what the rationale for it is.
> It doesn't appear to be used in the core TurboGears package, so I
> suppose it must be in the various add-ons, which I haven't had time
> to go through yet. Their custom method combination does *support*
> before/after/around methods, but their core tests only tested
> "around" methods that I saw.
I'm looking forward to a more complete examination of that use case.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000