[EMAIL PROTECTED] wrote:
I think what bothers me most about this is that it seems there is no
way to tell the difference between class methods and instance
methods. That the distinction is only made when the body of the
method does something which is is not supposed to do (method called
with a class invocant attempts to access an instance variable, etc).
This is one of the major problems that I have always had with Perl 5
OO. That there is a very fuzzy fuzzy line between the
responsibilities of a class and an instance.
I can see the notion of "a class which is not yet instantiated", this
makes sense in many contexts. But I don't think that in order to have
this, we need to bring back this element of Perl 5 OO. I think we can
still have all the behaviors you have been describing, and still keep
classes and their instances as distinct entities.
It just recently occured to me that Class is a Package. So, on the
object model level, class methods/attributes belong to the Package part
of a class, while instance methods/attributes belong to the Class part
of a class - insofar as they're made distinct by use of my/our.
Larry's proposal is to remove that difference for multimethods.
Personally I can't think of a good objection to that idea (except if it
may be bad for performance - is there a plan to infer types and
auto-inline? I that case, declaring that you don't care about instance
part of the object's functionality can really help).
Miro
- Re: Re(vised): Proposal to make class method non-inherita... Miroslav Silovic
-