On Thu, Jul 7, 2011 at 4:43 PM, Nicholas Clark <nick@ccl4.org> wrote: >> Which is exactly what it currently does. > > Except not quite, as restricted hashes let you delete their keys. I meant, that's exactly what it currently does for arrays. > I'm starting to think that the least insane solution to this *is* a general > purpose vtable interface for hashes, and a general purpose vtable interface > for arrays, and then implement tie (and all the other existing funky stuff) > with that. I started writing that once for arrays, but my previous code has significant bitrot and I probably should start all over. There are some tricky cases to it though, as always. > It would then give the flexibility to do other stuff well, such as decently > sparse arrays, and (I think) Reini's proposed typed arrays. Yeah. It's obviously useful, and currently having to using ties for that kind of stuff simply sucks balls. LeonThread Previous | Thread Next