Re: roles (Was: enums and bitenums)

2003-12-11 Thread Jonathan Lang
Paul Hodges wrote: > Jonathan Lang <[EMAIL PROTECTED]> wrote: > > Incidently, I think I've caught on to _one_ of the concepts in the > > upcoming object-orientation proposal: linguistically, there's a triad > > of "basic verbs" - namely "be", "do", and "have". If I'm following > > things properly,

Re: roles (Was: enums and bitenums)

2003-12-11 Thread chromatic
On Thu, 2003-12-11 at 18:15, Jonathan Lang wrote: > Based on the source material pointed to as your inspiration for roles, I'm > a little confused as to how roles and classes could be unified. From what > I read in the source material, a key point of a role (well, they weren't > actually calling

Re: roles (Was: enums and bitenums)

2003-12-11 Thread Paul Hodges
--- Jonathan Lang <[EMAIL PROTECTED]> wrote: > Incidently, I think I've caught on to _one_ of the concepts in the > upcoming object-orientation proposal: linguistically, there's a triad > of "basic verbs" - namely "be", "do", and "have". If I'm following > things properly, one could think of an o

roles (Was: enums and bitenums)

2003-12-11 Thread Jonathan Lang
I'm invoking the principle that the only stupid question is the one not asked: Larry Wall wrote: > if indeed properties can be unified with roles (and roles with > classes). Based on the source material pointed to as your inspiration for roles, I'm a little confused as to how roles and classe

Re: enums and bitenums

2003-12-11 Thread Larry Wall
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

Re: enums and bitenums

2003-12-11 Thread Uri Guttman
> "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

Re: enums and bitenums

2003-12-11 Thread Larry Wall
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

Re: enums and bitenums

2003-12-11 Thread Larry Wall
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

Re: enums and bitenums

2003-12-11 Thread Luke Palmer
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 > >

Re: enums and bitenums

2003-12-11 Thread Michael Lazzaro
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

Re: enums and bitenums

2003-12-11 Thread Larry Wall
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

enums and bitenums

2003-12-11 Thread Stéphane Payrard
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. -- stef

Re: Iterating through two arrays at once

2003-12-11 Thread Jonathan Scott Duff
On Wed, Dec 10, 2003 at 11:44:15PM -0500, Joe Gottman wrote: >In Perl 6, how will it be possible to iterate through two arrays at the > same time? According to Apocalypse 4, the syntax is > for @a; @b -> $a; $b { > > According to the book "Perl 6 Essentials" the syntax is > for zip(