John Williams wrote:
I'm still not buying the autoinstantiation argument. All the other (non-M.L.) threads I have read are requiring my $a is Foo = .new; # or some such...
Yes. You're confusing auto-instantiation of *implementation type* (good) with autoinstantiation of *stored value* (bad).
Both your examples above create the varible $a, but it contains the value of undef, not an instance of Foo.
Correct. But: my Foo $var; is implemented by an underlying (possibly optimized-away) Scalar object. Whereas: my $var is Foo; is implemented by an underlying Foo object. It's only this underlying Foo object that is auto-instantiated. Damian