Re: enums and bitenums

2003-12-12 Thread Andy Wardley
Larry Wall wrote: Anyway, this all implies that use of a role as a method name defaults to returning whether the type in question matches the subtype. That is, when you say: $foo.true $bar.red [...] $bar.red [...] $baz.Byte it's asking whether the Int property fulfills

Vocabulary

2003-12-12 Thread Luke Palmer
So I'm seeing a lot of inconsistent OO-vocabulary around here, and it makes things pretty hard to understand. So here's how Perl 6 is using said inconsistent terms, AFAIK: - attribute A concrete data member of a class. Used with Chas. - property An out-of-band sticky note

Re: enums and bitenums

2003-12-12 Thread Eirik Berg Hanssen
Larry Wall [EMAIL PROTECTED] writes: On Thu, Dec 11, 2003 at 04:18:19PM -0700, Luke Palmer wrote: : Larry Wall writes: : Anyway, this all implies that use of a role as a method name defaults to : returning whether the type in question matches the subtype. Why? Why should it be a method?

Re: Vocabulary

2003-12-12 Thread Jonathan Scott Duff
On Fri, Dec 12, 2003 at 04:23:02AM -0700, Luke Palmer wrote: So I'm seeing a lot of inconsistent OO-vocabulary around here, and it makes things pretty hard to understand. So here's how Perl 6 is using said inconsistent terms, AFAIK: - attribute A concrete data member of a class.

Re: enums and bitenums

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 04:05:25PM +0100, Eirik Berg Hanssen wrote: : Larry Wall [EMAIL PROTECTED] writes: : : On Thu, Dec 11, 2003 at 04:18:19PM -0700, Luke Palmer wrote: : : Larry Wall writes: : : Anyway, this all implies that use of a role as a method name defaults to : : returning

Re: Vocabulary

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 04:23:02AM -0700, Luke Palmer wrote: : So I'm seeing a lot of inconsistent OO-vocabulary around here, and it : makes things pretty hard to understand. Agreed. : So here's how Perl 6 is using said inconsistent terms, AFAIK: : : - attribute : A concrete data

Re: enums and bitenums

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 09:36:45AM +, Andy Wardley wrote: : Larry Wall wrote: : Anyway, this all implies that use of a role as a method name defaults to : returning whether the type in question matches the subtype. That is, : when you say: : : $foo.true : $bar.red : [...] :

RE: enums and bitenums

2003-12-12 Thread Austin Hastings
-Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 1:04 PM [Warning: speculation ahead.] Noted. I've been thinking that enums might just be subtypes of roles/properties. After all, when you say 0 but true it might really mean

RE: Vocabulary

2003-12-12 Thread Austin Hastings
-Original Message- From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 11:13 AM To: Luke Palmer Cc: Language List Subject: Re: Vocabulary On Fri, Dec 12, 2003 at 04:23:02AM -0700, Luke Palmer wrote: So I'm seeing a lot of inconsistent

FW: Vocabulary

2003-12-12 Thread Austin Hastings
-Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 6:23 AM So I'm seeing a lot of inconsistent OO-vocabulary around here, and it makes things pretty hard to understand. So here's how Perl 6 is using said inconsistent terms, AFAIK:

RE: Vocabulary

2003-12-12 Thread Austin Hastings
-Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 12:17 PM : - role : A collection of methods to be incorporated into a class sans A role can also supply one or more attributes. So a role can constrain values and add behavior

RE: enums and bitenums

2003-12-12 Thread Austin Hastings
-Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:44 PM Potentially, though roles are more properly thought of as types than classes. That is, they're abstract sets of values. You can instantiate one sufficiently well to take a

Re: enums and bitenums

2003-12-12 Thread Paul Hodges
Larry said: The interesting question to me is what $ref = \$foo.as(Color); returns. It looks like a typed reference to me, but it's still a reference to the object in $foo, or can behave as one somehow. I don't think it should generate a reference to the bare role, because roles

Re: Vocabulary

2003-12-12 Thread Stéphane Payrard
A role can also supply one or more attributes. : inheritance (and maybe some other stuff, too). Used with Cdoes. The smalltalk paper you mentionned which talked about roles (under the name of traits) said that roles were stateless. What are the consequences of using stateful

Re: Vocabulary

2003-12-12 Thread Dan Sugalski
At 9:16 AM -0800 12/12/03, Larry Wall wrote: On Fri, Dec 12, 2003 at 04:23:02AM -0700, Luke Palmer wrote: : - property : An out-of-band sticky note to be placed on a single object. : Used with Cbut. Maybe applied with? : - trait : A compile time sticky note to be

Re: enums and bitenums

2003-12-12 Thread Smylers
Larry Wall writes: I think roles are a little bit like quarks--they're fine in theory, but it's scary to have loose ones floating around. Wow. (And please can whoever looks after the quote of the day on Perl.com add that one to the hopper ...) Smylers

Re: enums and bitenums

2003-12-12 Thread Eirik Berg Hanssen
Larry Wall [EMAIL PROTECTED] writes: On Fri, Dec 12, 2003 at 04:05:25PM +0100, Eirik Berg Hanssen wrote: : I for one would appreciate the visual clue that we access properties : and subclasses as roles ($foo~~bareword), while we access attributes : (with accessors) as methods

Re: Vocabulary

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 07:12:40PM +0100, Stéphane Payrard wrote: : : A role can also supply one or more attributes. : : : inheritance (and maybe some other stuff, too). Used with Cdoes. : : The smalltalk paper you mentionned which talked about roles (under : the name of traits)

Re: enums and bitenums

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 10:30:06PM +0100, Eirik Berg Hanssen wrote: : Larry Wall [EMAIL PROTECTED] writes: : : On Fri, Dec 12, 2003 at 04:05:25PM +0100, Eirik Berg Hanssen wrote: : : : I for one would appreciate the visual clue that we access properties : : and subclasses as roles

Re: enums and bitenums

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 03:10:30PM -0800, Paul Hodges wrote: : Ok, wait a sec. Does that mean different references to the same critter : can have differing sets of aspects? : : my Dog $Spot; : my $doggie = Dog.new(); : my $meandog = \$doggie.as(AttackDog); : my $nicedog =

Re: FW: Vocabulary

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 04:31:32PM -0500, Austin Hastings wrote: : - trait :A compile time sticky note to be placed on a wide variety : of things. Used with Cis. : : Did I miss something with IS and OF? : : That is, I think: : : Cis means storage type, while Cof means trait or

Re: Vocabulary

2003-12-12 Thread Casey West
It was Friday, December 12, 2003 when Luke Palmer took the soap box, saying: : So I'm seeing a lot of inconsistent OO-vocabulary around here, and it : makes things pretty hard to understand. Awesome. I've taken your original, plus comments so far and created perlvocab.pod. Lets give it a couple

Re: Vocabulary

2003-12-12 Thread Larry Wall
On Fri, Dec 12, 2003 at 05:17:37PM -0500, Austin Hastings wrote: : -Original Message- : From: Larry Wall [mailto:[EMAIL PROTECTED] : Sent: Friday, December 12, 2003 12:17 PM : : : - role : : A collection of methods to be incorporated into a class sans : : A role can also