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
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
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?
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.
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
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
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
: [...]
:
-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
-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
-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:
-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
-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
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
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
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
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
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
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)
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
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 =
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
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
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
23 matches
Mail list logo