On Mon, 14 Oct 2002, Larry Wall wrote:
: We haven't solved the problem of instance methods that want to
: reject class invocants at compile time.  Though I suppose explicitly
: declaring the type of the invocant would have that effect.  I'm sure
: there are some who would argue (and I might be one of them) that an
: implicit invocant should default to only accepting an instance, and
: you have to declare an untyped invocant to get class-or-instance.
: (Or declare it with a class superposition like (Class|Dog), which
: presumably lets you pass either a Class instance or a Dog instance).

And I should point out that this approach would be good not just for
type purity, but because it optimizes for the common case.  Class methods
are much rarer than instance methods.  And the class-or-instance approach
seems to be even rarer than ordinary class methods, in practice.

Larry

Reply via email to