>From: [EMAIL PROTECTED]
>> Wow, this is nice. He means (I think) that this will be translated into
>> my Date $bday = Date->new('June 25, 2002');
I don't think this is going to work. First off, there
is no predefined constructor name in Perl. Secondly,
you can have multiple constructors in the same class.
And thirdly Date.new (for better or for worse) does
not have to return a Date object.
Finally, if these problems could be surmounted (ie
Perl 6 defines an implicit constructor), then we get
very subtle bugs like this
my Dog $spot = Poodle.new;
$spot is typed to accept Dog subclasses, right? But
what if Dog.new is typed to accept an object as it's
first argument? Or, worse, has no argument list? Does
this construct turn into
my Dog $spot = Dog.new( Poodle.new );
or
my $spot is 'Dog';
$spot = new Poodle.new
-Erik
Is your boss reading your email? ....Probably
Keep your messages private by using Lycos Mail.
Sign up today at http://mail.lycos.com