On Sat, Dec 13, 2003 at 03:43:00PM -0800, Paul Hodges wrote:
: Amen, brutha. Accordingly, do we have an idea what it actually means to
: add a type to something? I mean, I get that we could say
:
: print "yup" if $Spot ~~ AttackDog;
:
: but is there still
:
: print ref $Spot;
:
: and if so
--- Larry Wall <[EMAIL PROTECTED]> wrote:
> On Sat, Dec 13, 2003 at 07:16:21AM -0800, Paul Hodges wrote:
> : $Spot = $visitor.nephew ?? $nicedog :: $meandog;
> :
> : Which brings up a small side note: that's a successfully applied
> : boolean context for $visitor.nephew, right?
>
> Yes, but $v
On Sat, Dec 13, 2003 at 07:16:21AM -0800, Paul Hodges wrote:
: $Spot = $visitor.nephew ?? $nicedog :: $meandog;
:
: Which brings up a small side note: that's a successfully applied
: boolean context for $visitor.nephew, right?
Yes, but $visitor.nephew is no longer .does(nephew) in my current vi
On Sat, Dec 13, 2003 at 12:22:00PM -0500, Austin Hastings wrote:
: > We might be able to make it work, though as you say, there are other
: > ways to get there, and the chances are that at least one of them will
: > be a better way. Certainly when the Dog object's class is composed, it
: > will ha
On Sat, Dec 13, 2003 at 01:42:58PM +, Andy Wardley wrote:
: How about a single colon?
:
: Color:green
Vaguely possible, but the lexer would have to distinguish
Color:green
Color: green
Color :green
It may yet do that, but probably not for this reason.
: This is the same s
> -Original Message-
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 13, 2003 9:30 AM
> To: Andy Wardley; Larry Wall; Perl6; [EMAIL PROTECTED]
> Subject: Re: enums and bitenums
>
>
> Andy Wardley writes:
> > Larry Wall wrote:
>
> -Original Message-
> From: Larry Wall [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 7:39 PM
> To: Perl6
> Subject: Re: enums and bitenums
>
>
> On Fri, Dec 12, 2003 at 03:10:30PM -0800, Paul Hodges wrote:
> : Ok, wait a sec. Does that mean diffe
--- Larry Wall <[EMAIL PROTECTED]> wrote:
> 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 $meando
Andy Wardley writes:
> Larry Wall wrote:
> > Well, we can't use -> because we're using that for something else.
> > But it's certainly true that we'll have to have some mechanism for
> > disambiguating Color.green from Blackberry.green. After all,
> >
> > Blackberry.green == Color.red
> >
>
Larry Wall wrote:
> Well, we can't use -> because we're using that for something else.
> But it's certainly true that we'll have to have some mechanism for
> disambiguating Color.green from Blackberry.green. After all,
>
> Blackberry.green == Color.red
>
> Or maybe it's
>
> Blackberry::
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 = \$doggi
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 ($foo
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 ($foo.ba
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 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 ro
> -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 t
> -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 rea
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
: [...]
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
: > : > returnin
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
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
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. That is,
: > when you say
: >
: > $foo.true
: >
: > it's asking wheth
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
> Or are you worried that these have to be declared at all? I think
> we need to declare them or we can't use them as bare identifiers.
> There are no barewords in Perl 6, so they have to be something
> predeclared, or otherwise syntact
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. That is,
: > when you say
: >
: > $foo.true
: >
: > it's asking wheth
On Thu, Dec 11, 2003 at 02:01:17PM -0800, Michael Lazzaro wrote:
: So C would be for casting, not coercion, right?
:
: Suppose you have a class Foo, such that:
:
: class Foo does (Bar, Baz) {
: ...
: }
:
: ... or however that looks. May I then presume that
:
: $foo.Bar.zap
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. That is,
> when you say
>
> $foo.true
>
> it's asking whether the Boolean property fulfills the true constraint.
> When you say
>
>
On Thursday, December 11, 2003, at 10:04 AM, Larry Wall wrote:
Explicitly:
$bar.does(Color)# does $bar know how to be a Color?
$bar.as(Color) # always cast to Color
Implicitly boolean:
$bar ~~ Color # $bar.does(Color)
?$bar.Color # $bar.does(Color)
if $b
On Thu, Dec 11, 2003 at 02:48:06PM +0100, Stéphane Payrard wrote:
: Hi,
:
: I don't remember anything about enums and bitenums in the
: apocalypses. This is probably not very difficult to roll out
: something using macros but I feel that should belong to the
: standard language.
[Warning: specula
28 matches
Mail list logo