My current long-term project for Rakudo is currently the bind operator (:=). They serve the function of references or pointers in other languages; it allows a second variable to point to the same address in memory*.
So all I’d have to do is, for
$b := $a, get the location of
$a (accessible in P6 with
$a.WHERE), and set the location of
$b to that same spot, right? Well, it’s not that easy.
$b.WHERE = $a.WHERE doesn’t work, because WHERE is understandably a readonly value. So, that means I have to get into the NQP and PIR of Rakudo.
So I’m currently attempting to find how the variable is created and then create
infix:<:=> to do what
infix:<=> does, but in a slightly different way. The guts of Rakudo aren’t being very nice to me, so I have to keep on searching
*See http://use.perl.org/~masak/journal/40246 for a better explanation of binding.