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

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 = Jabberwock.new

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 foregrounding this

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 pugs's problem.