From: ludo@gnu.org (Ludovic Courtès)
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: cannot compile: srfi-10 define-reader-ctor 'hash '#,(
Date: Wed, 13 Aug 2014 23:06:45 +0200 [thread overview]
Message-ID: <87fvh02j6i.fsf@gnu.org> (raw)
In-Reply-To: <878ums17q3.fsf@drakenvlieg.flower> (Jan Nieuwenhuizen's message of "Wed, 13 Aug 2014 21:59:32 +0200")
Jan Nieuwenhuizen <janneke@gnu.org> skribis:
> Ludovic Courtès writes:
>
>> The problem is that SRFI-10 itself does not specify an external
>> representation for hash tables, nor does Guile. Thus this patch cannot
>> be applied.
>
> Yes, I understand that...Still, "wouldn't it be nice" if Scheme/Guile
> had something that javascript has, in JSON hash tables are "simply"
>
> {"key0": value, "key1": value}
Yes, it would.
But the beauty of Scheme is that the language can be extended to support
that, like with the ‘hash-table’ macro suggested at
<http://lists.gnu.org/archive/html/guile-user/2014-07/msg00009.html>.
> and although that's in some way much uncooler and restricted and set-in
> stone wrt Scheme readers and SRFI-10...you *are* able to stream and
> communicate objects over ascii/utf-8, unlike #,(hash ...
If the goal is to serialize/unserialize things, then the best option is
to devise an external representation, say:
(hash-table (key0 value0) ...)
And then have ‘read-hash-table’ and ‘write-hash-table’ procedures
(rather than pass arbitrary sexps read from the wire to ‘eval’.)
> Here we are with a unimaginable cool srfi-10 reader extension, but we
> cannot really use it to communicate.
SRFI-10 is cool to reduce typing, but I’m not convinced it really helps here.
Ludo’.
next prev parent reply other threads:[~2014-08-13 21:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y4w9jog8.fsf@drakenvlieg.flower>
2014-07-05 13:40 ` cannot compile: srfi-10 define-reader-ctor 'hash '#,( Ludovic Courtès
2014-07-31 6:27 ` Jan Nieuwenhuizen
2014-07-31 19:15 ` Neil Jerram
2014-08-14 10:27 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 19:42 ` Neil Jerram
2014-08-14 19:54 ` Taylan Ulrich Bayirli/Kammer
2014-08-17 15:08 ` Ludovic Courtès
2014-08-11 15:48 ` Ludovic Courtès
2014-08-13 19:59 ` Jan Nieuwenhuizen
2014-08-13 20:43 ` Marko Rauhamaa
2014-08-13 21:00 ` Jan Nieuwenhuizen
2014-08-13 21:13 ` Ludovic Courtès
2014-08-13 21:33 ` Marko Rauhamaa
2014-08-14 4:03 ` Mark H Weaver
2014-08-13 21:06 ` Ludovic Courtès [this message]
2014-08-14 9:19 ` Panicz Maciej Godek
2014-08-14 9:53 ` Marko Rauhamaa
2014-08-14 10:30 ` Panicz Maciej Godek
2014-08-14 10:36 ` Marko Rauhamaa
2014-08-14 10:45 ` Panicz Maciej Godek
2014-08-14 12:59 ` Marko Rauhamaa
2014-08-14 13:58 ` Panicz Maciej Godek
2014-08-14 11:13 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 13:17 ` Marko Rauhamaa
2014-08-14 14:34 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 17:16 ` Marko Rauhamaa
2014-08-14 18:28 ` Taylan Ulrich Bayirli/Kammer
2014-08-14 19:24 ` Marko Rauhamaa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvh02j6i.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-user@gnu.org \
--cc=janneke@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).