Re: Default values for instance variables

2005-11-08 Thread Luke Palmer
On 11/8/05, Gaal Yahas <[EMAIL PROTECTED]> wrote: > On Tue, Nov 08, 2005 at 07:07:42PM +, Luke Palmer wrote: > > > class Jabberwock { > > > has $.jaws = "bite"; > > > has $.claws = "catch"; > > > } > > > > That is legal Perl 6. The fact that it is not legal pugs is

Re: Implicit Role Declarations (was Re: implicitly doing a role)

2005-11-08 Thread Rob Kinyon
On 11/8/05, chromatic <[EMAIL PROTECTED]> wrote: > On Fri, 2005-11-04 at 13:15 -0500, Austin Frank wrote: > > > If roles are interfaces, do we want any class that provides an interface > > consistent with a role to implicitly do the role? That is, if a class > > fulfills all of the interface requi

Implicit Role Declarations (was Re: implicitly doing a role)

2005-11-08 Thread chromatic
On Fri, 2005-11-04 at 13:15 -0500, Austin Frank wrote: > If roles are interfaces, do we want any class that provides an interface > consistent with a role to implicitly do the role? That is, if a class > fulfills all of the interface requirements of a role without actually > saying it does the

Re: private methods and role composition

2005-11-08 Thread Larry Wall
On Sat, Nov 05, 2005 at 11:35:38AM -0800, Jonathan Lang wrote: : First off: is there a way to declare a method as being private to a role? We're still batting around the notion of private methods. Certainly with a lexically scoped sub you can get most of the same benefit. Trust could then perhaps

Re: Ways to add behavior

2005-11-08 Thread Larry Wall
On Mon, Nov 07, 2005 at 08:44:28PM +0100, TSa wrote: : HaloO, : : Larry Wall wrote: : > : ::Takes3Ints ::= :(Int,Int,Int --> Any); : > : : > : my &foo:(Takes3Ints); : > : > I'd say that has to be something like: : > : > my &foo:(Takes3Ints:); : > : > or maybe one of : > : > my

Re: Default values for instance variables

2005-11-08 Thread Gaal Yahas
On Tue, Nov 08, 2005 at 07:07:42PM +, Luke Palmer wrote: > > class Jabberwock { > > has $.jaws = "bite"; > > has $.claws = "catch"; > > } > > That is legal Perl 6. The fact that it is not legal pugs is pugs's problem. > :-) Noted. Perhaps it'd be worth foregroun

Re: Default values for instance variables

2005-11-08 Thread Luke Palmer
On 11/8/05, Gaal Yahas <[EMAIL PROTECTED]> wrote: > Wouldn't it be nice to be able to supply default values for instance > variables right in the attribute declaration? > > class Jabberwock { > has $.jaws = "bite"; > has $.claws = "catch"; > } > > my $scary = Jabbe

Default values for instance variables

2005-11-08 Thread Gaal Yahas
Wouldn't it be nice to be able to supply default values for instance variables right in the attribute declaration? class Jabberwock { has $.jaws = "bite"; has $.claws = "catch"; } my $scary = Jabberwock.new; my $wimpy = Jabberwock.new(jaws => "chew", claws =