Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion A12: a doubt about .meta, .dispatcher and final methods
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aldo Calpini  
View profile  
 More options Apr 23 2004, 4:25 am
Newsgroups: perl.perl6.language
From: d...@perl.it (Aldo Calpini)
Date: Fri, 23 Apr 2004 10:25:15 +0200
Local: Fri, Apr 23 2004 4:25 am
Subject: A12: a doubt about .meta, .dispatcher and final methods
hello,

sorry if this has been discussed before, I did a quick search in the
Archive and the summaries but can't find a similar topic.

I've just read A12, and while I really like the inherent orthogonality
of the whole object system as it is (will be) implemented, there is
something that puzzles me. from what I read, it seems that every class
will implicitly call "does Dispatch" (which provides a .dispatcher
method) and "is Object" (which provides a .meta method). (or more
probably, class Object "does Dispatch" itself). so, if this is true, I
guess I could never write a class that does:

    class MyClass {
        has LethalWeapon $.dispatcher;
        method meta { say "$_ is doing meta!" }
    }

both of them would make my class pretty useless, I think, since it could
not (correctly, at least) dispatch methods anymore. and I won't be able
to access metadata.

what would Perl6 do in such a case? I think it should complain, and
probably don't let me compile such a class, but what is the underlying
implementation for this? are .dispatcher, .meta (and maybe some others
too) "special" methods that can't be, in any case, overloaded?

and eventually, can I use a similar mechanism in my own classes, that
is, write a "final" method (something like: you can derive from me
however you like, but you can't redefine this method of mine)?

cheers,
Aldo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.