At 10:10 AM -0400 5/15/02, Aaron Sherman wrote: >On Sat, 2002-05-11 at 00:39, Dan Sugalski wrote: >> At 8:58 PM -0700 5/10/02, [EMAIL PROTECTED] wrote: >> >I was wondering how perl6 would stringify (as in Data::Dumper): >> >> That's not stringification. It's serialization, which is a different >> thing entirely. >> >> What you'll potentially get is a thing that can be completely >> reconstituted into what it originally was, complete with variables, >> methods, attributes, and whatnot. How much gets serialized depends on >> what you'll choose--in the worst case, your entire program will need >> to get serialized, but that'll be doable. > >This seems like a no-brainer to me, so I must be missing something ;-) > >Wouldn't it be possible to just settle on Parrot byte-code as a >serialization form? If so, everything is serializable, no?
Mostly, yes, if we put aside the issue of code written in C. There is the issue of how much gets serialized, and how things get reconstituted, which is where things get interesting. Assume this: package foo; our @ISA = (Rezrov); my $bar; $foo = sub {$bar++}; $baz = sub {$bar++}; if you serialize and reconstitute $foo *and* $baz, should they share a $bar? Should all of Rezrov be serialized with them and, if so, do they each get a private copy? Do they both see the same @ISA, as its global? It's all doable, of course, and as much a matter of policy on serializing and reconstituting. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk