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
Yet another keyed ops proposal[1]
Given the Perl6 expression:
@a[$i] = @b[1] + $k;
This should translate to
add P0[I0], P1[1], I2
But having multi-keyed variants of all relevant opcodes would burst
our opcode count to #of-keyed-opcodes * #of-key-permutations. That's
not feasable.
So here
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
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 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
: [...]
:
At 3:42 PM -0500 12/11/03, Melvin Smith wrote:
At 03:05 PM 12/11/2003 -0500, Gordon Henriksen wrote:
Melvin Smith [EMAIL PROTECTED] wrote:
my $foo = Oracle::Instance::DEV1::db_block_buffers;
The namespace lookup in Oracle::Init checks the Oracle config
parameters which is external code.
All
Can anyone tell me why the following code:
.sub _main
.local PerlUndef val
val = new PerlUndef
_foo(bar, val)
end
.end
.sub _foo
.param string v1
.param pmc v2
.pcc_begin_return
.return 1
.pcc_end_return
.end
At 02:00 PM 12/12/2003 -0700, Cory Spencer wrote:
Can anyone tell me why the following code:
.sub _main
.local PerlUndef val
val = new PerlUndef
_foo(bar, val)
end
.end
.sub _foo
.param string v1
.param pmc v2
.pcc_begin_return
-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
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 04:27:59PM -0500, Austin Hastings wrote:
: -Original Message-
: From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED]
: I think I'm getting it but I'm not sure. Does something like this
: work?
:
: my role Teach { ... }
: my role Operate { ... }
:
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
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
27 matches
Mail list logo