I'm not up to speed on Perl 6. Between life and work I've been really squeezed. That's why I cursed you for asking that question :), if time permits I'll look into it. I do want to add callbacks though. One of my side projects is a perl-like language written in Perl. It's the basis for Yet Another Template Language. (Yes, I know it's been done to death) I want to avoid direct evaluation entirely. One thing that occured to me is that I could add a hook to any evaluated symbol or variable and use it to invalidate cached expressions when they are updated. (Most likely > half of the expressions won't change under iteration.)
I agree about the example, that's why I labeled them trivial. After the time I spent on this I was too fried and pressed for time to come up with something compelling.
Why must your tuple be crammed into a simple scalar?
I'm not sure what you mean by this. Do you mean that the positions are stored in an array ref? While I use iterators, I don't like the syntax. Most if not all of my motivation of getting into the guts of Perl is to try and bend it to my will :)
I've actually spent a lot of time trying to fathom the guts of Perl and it all started because of an iterator op I wanted to write and couldn't (The way it should work anyway)
findone { coderef } @array.
Though the examples are not great, it is common to want to attach some data to another piece of data. We do this all the time with lexical hashes and stringified refs, etc. After your question, it just seemed like a cool thing to do that might be practical. I personally dislike ties, or anything else that makes me change they way I would write something or requires prep work on my end. I also don't want subs messing with their callers. So it just seemed like a good way to accomplish it while improving my understanding of internals.
Any thoughts on requiring a "nameid"? The more I think about it, the more I think it should be required. I didn't want to call it a "packagename" as that was confusing. nameid is pretty bad too though. Perhaps "slotname"?
-Lee
"To be civilized is to deny one's nature."