External representation taylanbayirli@xxxxxx (10 Sep 2015 15:21 UTC)
Re: External representation taylanbayirli@xxxxxx (10 Sep 2015 15:22 UTC)
Re: External representation Arthur A. Gleckler (10 Sep 2015 15:24 UTC)
Re: External representation taylanbayirli@xxxxxx (10 Sep 2015 20:10 UTC)
Re: External representation Arthur A. Gleckler (10 Sep 2015 20:44 UTC)
Re: External representation taylanbayirli@xxxxxx (11 Sep 2015 07:36 UTC)
Re: External representation John Cowan (11 Sep 2015 13:04 UTC)
Re: External representation taylanbayirli@xxxxxx (11 Sep 2015 13:25 UTC)
Re: External representation Per Bothner (11 Sep 2015 14:05 UTC)
Re: External representation taylanbayirli@xxxxxx (11 Sep 2015 14:21 UTC)
Re: External representation Kevin Wortman (11 Sep 2015 19:10 UTC)
Re: External representation taylanbayirli@xxxxxx (11 Sep 2015 21:48 UTC)
Re: External representation Shiro Kawai (12 Sep 2015 02:04 UTC)
Re: External representation John Cowan (10 Sep 2015 16:30 UTC)
Re: External representation taylanbayirli@xxxxxx (10 Sep 2015 18:12 UTC)
Re: External representation John Cowan (10 Sep 2015 19:02 UTC)
Re: External representation Per Bothner (10 Sep 2015 21:25 UTC)
Re: External representation John Cowan (10 Sep 2015 21:52 UTC)

Re: External representation taylanbayirli@xxxxxx 11 Sep 2015 21:48 UTC

Kevin Wortman <xxxxxx@gmail.com> writes:

> R7RS-small defines alists, which are a longstanding data structure for
> key-value associations that has a reader syntax. I think that's why
> converting between hash tables and alists is important. (IIRC, that
> came up on another thread.) With those conversion routines you can
> convert a hashtable to an alist then write the alist, and vice-versa.
>
> Kevin Wortman

Right.  Sadly that doesn't encode any information about the hashtable's
hash and equivalence function.  Doing it manually is a chore.  This
external representation covers the most common cases, with possible
extensions in the future.

If we also had a good external representation for record types, that
would make 'read' and 'write-shared' incredibly powerful, even more so
than they already are.  You could output whole object graphs including
not only lists and vectors, but also record types and hashtables.  That
leaves out procedures, which is really unfortunate, but at least it
would only leave that.  (I assume the eof-object and ports are useless
to serialize.)

Taylan