[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11198: prefab structs in guile

From: Ludovic Courtès
Subject: bug#11198: prefab structs in guile
Date: Fri, 06 Jul 2012 00:14:55 +0200
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux)


Andy Wingo <address@hidden> skribis:

> On Thu 05 Jul 2012 23:55, address@hidden (Ludovic Courtès) writes:
>> So I’d be in the ‘define-serializable-struct’ camp, so to speak.
> That's a valid position to have in general.  I can also imagine cases in
> which you would choose other things.  It's a spectrum.

Yes, sure.  It can be convenient to have something that makes it easy to
serialize structs.  But given that prefabs have to be “built in”, and
that they look can-of-wormey to my demanding eye ;-), I’d be in favor of
anything built atop structs.

And actually, there’s (oop goops save), which is extensible and
everything.  :-)

Side note: while writing readers/writers by hand may look tedious, the
advantage is that it makes it easy to leave room for future extensions,
like allowing the reader to suitably map an old version of a serialized
struct to the new data structure.

>> Prefabs raise an number of interesting issues.  For instance, what’s the
>> meaning of #s(sprout bean #f 17) in a module where ‘sprout’ is unbound?
> Prefab structs are not modular.  It is the same as in a module where
> `sprout' is bound.  Reading #s(sprout bean #f 17) may create an RTD if
> needed, but it does not create any bindings.

OK.  So there can only be one ‘sprout’ prefab RTD in the whole process,
I guess.

>> types are compared by name.
> As the documentation clearly indicates :), prefab structs are indeed
> compared by name, though in a combination with other characteristics
> (number of fields, and more characteristics for racket).

Right.  Argh.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]