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
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
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
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.