Matt Youell wrote:
>
> > mainstream OO languages go). It looks like Dog could be a type of String
> > subclass.
>
> That was my first thought as well. Besides, I'd rather type:
>
> my Dog $spot("Spot");
>
> Which says everything that needs to be said without any repetition, and it's
> fairly intuitive.
Exactly. I've got to start being more verbose in my examples. Here are
some different examples and how I personally think they would work given
this RFC and RFCs 159 and 161:
my Dog $spot; # $spot = Dog->CREATE
my Dog $spot (@args); # $spot = Dog->CREATE(@args)
my Dog $spot = "Spot"; # $spot = Dog->CREATE;
$spot->STORE("Spot")
my Dog $spot (@args) = "Spot"; # $spot = Dog->CREATE(@args);
# $spot->STORE("Spot");
Hopefully that's clear enough. And as everyone's noted, nobody's
claiming you can't do this:
my $spot = Dog->new("Spot", { @args });
Or something like that, if you like it better.
-Nate
- RFC 171 (v1) my Dog $spot should call a constructor im... Perl6 RFC Librarian
- Re: RFC 171 (v1) my Dog $spot should call a const... Nathan Wiger
- Re: RFC 171 (v1) my Dog $spot should call a const... Michael Maraist
- Re: RFC 171 (v1) my Dog $spot should call a c... Matt Youell
- Re: RFC 171 (v1) my Dog $spot should call... Nathan Wiger
- Re: RFC 171 (v1) my Dog $spot should ... Michael Fowler
- Re: RFC 171 (v1) my Dog $spot sh... Nathan Wiger
- Re: RFC 171 (v1) my Dog $spot should call a c... Michael Fowler
- Re: RFC 171 (v1) my Dog $spot should call a c... Jonathan Scott Duff
- Re: RFC 171 (v1) my Dog $spot should call... Hildo Biersma
- Re: RFC 171 (v1) my Dog $spot should ... Piers Cawley
- Re: RFC 171 (v1) my Dog $spot should call a const... Hildo Biersma
- Re: RFC 171 (v1) my Dog $spot should call a c... Matt Youell
- Re: RFC 171 (v1) my Dog $spot should call... Michael Fowler
- Re: RFC 171 (v1) my Dog $spot should call... Hildo Biersma
