From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
"guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: cannot compile: srfi-10 define-reader-ctor 'hash '#,(
Date: Thu, 14 Aug 2014 11:19:51 +0200 [thread overview]
Message-ID: <CAMFYt2b-J68omHPqeSK7KB3ZCiekYiPXySFdY7+LK8VTbVno+A@mail.gmail.com> (raw)
In-Reply-To: <878ums17q3.fsf@drakenvlieg.flower>
2014-08-13 21:59 GMT+02:00 Jan Nieuwenhuizen <janneke@gnu.org>:
> 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}
I have been thinking about that issue a lot, and concluded that it
wouldn't be "the Scheme way".
Scheme already has a nice representation for associactions, namely the
assoc lists. However, they are a bit problematic, because they are
ordered by nature and hence there's not much one can do with their
linear access time.
The proper solution, I believe, is to provide some means to create
unordered collections (i.e. sets or multisets). Some hints for
constructing such collections were given by Daniel Friedman and
reminded recently (like 10 years ago ;]) in Guy Steele's talk for
Friedman's 60th birthday:
http://www.youtube.com/watch?v=IHP7P_HlcBk
After that, a paper came out which described that idea in greater detail:
http://projects.csail.mit.edu/wiki/pub/JoeNear/FernMonad/frons.pdf
Anyway, I think it would be nice to provide a notation for unordered
collections in Scheme, so that the associations, written as '{(key .
value) ...}, could eventually be optimized and perhaps implemented as
hash tables internally in some cases.
next prev parent reply other threads:[~2014-08-14 9:19 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
2014-08-14 9:19 ` Panicz Maciej Godek [this message]
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=CAMFYt2b-J68omHPqeSK7KB3ZCiekYiPXySFdY7+LK8VTbVno+A@mail.gmail.com \
--to=godek.maciek@gmail.com \
--cc=guile-user@gnu.org \
--cc=janneke@gnu.org \
--cc=ludo@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).