> : > we can even have hyper-assignment : > : > > : > my ($a, $b) ^= new Foo; > : > : This is unlikely to do what you wanted. It creates a new Foo object and then > : assigns a reference to that one object to both $a and $b. It doesn't create two > : Foo objects. (But maybe one object referenced twice is what you wanted). > > It *might* possibly work to hyper the constructor: > > my ($a, $b) = ^new Foo
How would this know how may times to hype? By the count of its list context? And would that also work in dot notation: my ($a, $b) = Foo.^new(); ??? If so, will people be able to grok the subtle difference between C<.^> and C<^.>? > : > 7.) Quantum superpositions =============== > : > : > if ($x == any($a, $b, $c) { ... } > > The wave function of QS has not yet collapsed in Perl 6. > It's still in the same state(s) as the cat. <grin> Damian