guile-devel
[Top][All Lists]
Advanced

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

Re: records as s-expressions


From: Thamer Al-Harbash
Subject: Re: records as s-expressions
Date: Thu, 16 Oct 2003 00:40:30 -0400 (EDT)

On Tue, 7 Oct 2003, Marius Vollmer wrote:

Thanks Rob and Marius for your earlier comments.

> Depends on your implementation...

I planned the way I want to implement it today and would like to
know if there are any objections to my thoughts below.

> I see two choices: follow Common Lisp and use #S(<type> ...), or
> follow SRFI-10 and use something like #,(record <type> ...).  I don't
> think there is any SRFI that specifies a concrete read syntax for
> records.
>
> We already use #s for uniform arrays, but overwrite it when (srfi
> srfi-4) is loaded...  #S is free, tho.

Would it be reasonable to just use (read-hash-extend) to hook
into the existing reader, and as well as modify existing
boot-9.scm code cause records to (display) as #S(...)?

If I went with the SRFI-10 solution I'd be implementing this as a
(record-serialize) (record-unserialize) which seem a bit less
Schemeish to me.

If there's no objections to this I should be able to write it
Real Soon Now with minimal hassle.

-- 
Thamer Al-Harbash
GPG Key fingerprint: D7F3 1E3B F329 8DD5 FAE3  03B1 A663 E359 D686 AA1F




reply via email to

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