Sam Vilain wrote:
On Thu, 06 Mar 2003 05:10, Garrett Goebel wrote: > Several people have mentioned a desire to see Perl6 > and Parrot facilitate object persistence. Should > such issues be tackled in Parrot?
Not necessarily. Just be friendly to object persistence frameworks by exporting object relationships in a sensible and consistent manner. It is those relation- ships that drive the object persistence frameworks, and implementations of the object structure in various languages.
"exporting object relationships in a sensible and consistent manner"
Sounds like something worthy of more than a passing reference. In the context of parrot, what falls within the scope of a sensible and consistent manner?
Each PMC has a serialize and deserialize entry. The core will have calls to serialize various data element types and a way to note contained PMCs that should be serialized, and we'll be using a variant on the GC tracing system to make sure everything gets dumped properly, and only once, so data structures with cyclic references get handled right.
There isn't going to be anything special about objects as such--the engine treats them the same as plain scalars, arrays, or hashes.
I don't particularly see anything that needs any special treatment here. If some object needs to do weird things to properly serialize itself, because it's got a connection to something external for example, it just overrides its own serialize and deserialize entries.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk