If you reverse their order, it's simply a closure:
$dereferencer = { $^moose.<foo>[1]<bar><baz>[3] }; $dereferencer($datastructure);
Yep this is very akin to what Joost suggested for Perl 5 (and was also mentioned in the original thread), except that it's more 6ish. I was thinking... is in general the semantics of $datastructure.$dereferencer definite? Is it valid syntax anyway? If not, could a C<.> infix multi, or even a macro, be specified to "amount to" the function call specified above?
In reply to Re^2: [Perl 6] Any provision for a "dereferencing object"?
by blazar
in thread [Perl 6] Any provision for a "dereferencing object"?
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |