GNU bug report logs - #11198
serializing structs (prefabs)

Previous Next

Package: guile;

Reported by: Klaus Stehle <klaus.stehle <at> uni-tuebingen.de>

Date: Sat, 7 Apr 2012 20:18:02 UTC

Severity: wishlist

Full log


Message #32 received at 11198 <at> debbugs.gnu.org (full text, mbox):

From: Noah Lavine <noah.b.lavine <at> gmail.com>
To: Andy Wingo <wingo <at> pobox.com>
Cc: Mark H Weaver <mhw <at> netris.org>,
	Ludovic Courtès <ludo <at> gnu.org>, 11198 <at> debbugs.gnu.org,
	Klaus Stehle <klaus.stehle <at> uni-tuebingen.de>
Subject: Re: bug#11198: problems reading data with a "read-hash-extend"
	registered reader
Date: Tue, 24 Apr 2012 07:38:17 -0400
And just a quick note - this problem is more general than record
types. If someone added a type through C and wanted it to have a read
syntax, the same issue would apply. I can imagine times when this
would be very useful - for instance, you have a C extension to Guile,
and you want to be able to send data between your different Guile
instances in a way that is easy to manually inspect. You need a reader
and a serializer for your C things.

Noah

On Tue, Apr 24, 2012 at 7:24 AM, Noah Lavine <noah.b.lavine <at> gmail.com> wrote:
> Hello,
>
>>> I think the reader should only return valid Scheme objects that have a
>>> read syntax (info "(r5rs) Lexical Structure"), and records are not among
>>> them.
>>
>> I agree, FWIW.
>
> This seems like circular logic to me - extending the reader should
> mean that new types can have read syntax. The problem here, I think,
> is that the compiler also needs to know how to serialize those types.
>
> Why don't we provide an interface to define a serializer as well as a
> reader, and have compile-assembly use these serializers? As long as
> each type has both a serializer and a reader, it should work fine.
> That also feels symmetrical, which I take as a good sign. :-)
>
> Noah




This bug report was last modified 12 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.