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 Object notes
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
 
Dan Sugalski  
View profile  
 More options Feb 23 2004, 11:49 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Mon, 23 Feb 2004 11:28:41 -0500
Local: Mon, Feb 23 2004 11:28 am
Subject: Object notes
As I wait for an interim setup to build...

Here's the lowdown on what we're going to get with object:

1) Multiple Inheritance
2) Attributes
3) Object instantiation
4) Method calls

Woo. What we won't get is:

1) Adding parents to a class that's been subclassed or instantiated
2) Adding attributes to a class that's been subclassed or instantiated
3) Method redistpatch
4) Fancy namespace lookups

So you can create classes with multiple parents and multiple
attributes, instantiate objects, call methods on the objects, and
twiddle the objects attributes. If the parents of "Foo" are "Bar",
"Baz", and "Some::Other::Thing" then we'll search those in order,
treating the colons as, well, colons, rather than namespace
separators. That means no hierarchical namespaces. Yet.

Adding methods to a class means sticking a PMC for the named method
in the class namespace. So this:

     ns = global "Some::Other::Thing"
     ns['bar'] = SomeMethodPMC

is how to add the method 'bar' to the namespace "Some::Other::Thing".
This will change, and may well not have to be done if the namespace
stuff we were asking about earlier is actually in, but I'm not sure
yet. I expect I'll find out soon.
--
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


 
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.