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

Reply via email to