Perl6 RFC Librarian wrote:
>> =head1 DESCRIPTION
> 
> What is currently an optimization for pseudo-hashes:
> 
>     my Dog $spot = Dog->new();
> 
> should be replaced with:
> 
>     my Dog $spot;
> 
> which calls an implicit constructor (discussed further in the IMPLEMENTATION
> section).  The optimization behaviour can be retained in some form (see the
> MIGRATION section).

My previous concerns have not been adressed:
- There may not be a default constructor
- This makes creations of Singleton classes impossible
- There is a good reason to created typed, but undef, references
  and fill them in later.

> For example, the syntax:
> 
>     my Dog $spot = "Spot";
> 
> would be transformed to, or be the equivalent of:
> 
>     $spot = Dog->$METHOD("Spot");

Based on my C++ experience, this should only be allowed if the
constructor has been marked as 'implicit construction safe'.

Hildo

Reply via email to