Howdy,

While browsing the updated synopses, I noticed a problem with how
scalar container methods are called. Currently, both value methods and
container methods are shown in the synopses as being called with
C<$foo.bar()>.

For several reasons, that doesn't work for me. The method conflict
between container methods and value methods should be obvious. What
should ((1|2)|(3&4)).values return?

The answer is simple enough: for scalar container method calls, use
$foo.\bar(), which would be syntactic sugar for (\$foo).bar, and would
be the Perl6 equivalent to the Perl5 idiom tied($foo)->bar()

That way, we get:

((1|2)|(3&4)).values ~~ (1|3,2|4)   # (1,2)|(3,4) I presume
((1|2)|(3&4)).\values ~~ (1|2, 3&4)

@foo.\elems would work the same as @foo.elems, since @foo in scalar
context *is* the container object in the first place.

Comments?

Ashley Winters

Reply via email to