From: Noah Lavine <noah.b.lavine@gmail.com>
To: Daniel Hartwig <mandyke@gmail.com>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: guile-json 0.2.0 released
Date: Thu, 4 Apr 2013 22:47:33 -0400 [thread overview]
Message-ID: <CA+U71=NqAL8Xj5mKvUNLEvN+Oi669xO3oSdCY+Dm0-HCGOTLPA@mail.gmail.com> (raw)
In-Reply-To: <CAN3veRfeuh0OXPAKhO2TNeuBQ7w++LOvpUEVWFSbbakdOS7XEg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]
Hello,
I haven't thought about this whole email, but I disagree with this part of
your response:
On Thu, Apr 4, 2013 at 8:17 PM, Daniel Hartwig <mandyke@gmail.com> wrote:
> Hash tables are not just a set of (key, value) pairs, they also
> include the particular hash and equality procedures that are used with
> them. These could be arbitrary procedures, and procedures can not
> generally be converted to a string and back again, so, by extension,
> neither can hash tables even if you could do that for their content.
>
Although hash tables in general do include arbitrary procedures, in Guile's
implementation there are only three to choose from, so it should be
possible to represent them in syntax.
For exactly this reason, I believe that actually "hash table" is a bad name
for the data structure. I think of Guile's hash tables as a generic
dictionary structure with average O(1)-time lookup, insertion and deletion.
It makes sense to me to give this structure an external representation,
because it has a lot of common uses. (It seems especially useful to me for
configuration files.)
That does privilege one sort of generic dictionary structure over other
implementations of the same interface - such as hash tables with different
hash procedures, as you mentioned. This is fine with me, because I think
that use cases fall into two categories. In the common case, the dictionary
will not be in a time- or performance-critical part of a program, and
programmers should use Guile's built-in dictionary types and not waste time
implementing their own. In the rare case, when dictionary lookups are time-
or space-critical and must be optimized, *then* it's worth it to design
custom hash functions and implement hash tables from vectors and similar
things. However, I think that case is sufficiently uncommon that it should
not hold back the common case from having convenient syntax.
Best,
Noah
[-- Attachment #2: Type: text/html, Size: 2371 bytes --]
next prev parent reply other threads:[~2013-04-05 2:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 7:08 guile-json 0.2.0 released Aleix Conchillo Flaqué
2013-04-04 9:11 ` Panicz Maciej Godek
2013-04-04 10:15 ` Taylan Ulrich B.
2013-04-04 12:06 ` Panicz Maciej Godek
2013-04-04 22:21 ` Taylan Ulrich B.
2013-04-04 22:59 ` Aleix Conchillo Flaqué
2013-04-05 7:35 ` Panicz Maciej Godek
2013-04-04 23:39 ` Daniel Hartwig
2013-04-07 11:40 ` Panicz Maciej Godek
2013-04-07 20:38 ` Taylan Ulrich B.
2013-04-08 1:51 ` Daniel Hartwig
2013-04-08 2:11 ` Daniel Hartwig
2013-04-05 0:17 ` Daniel Hartwig
2013-04-05 2:47 ` Noah Lavine [this message]
2013-04-05 9:35 ` Daniel Hartwig
2013-04-05 13:18 ` Noah Lavine
2013-04-05 9:41 ` Panicz Maciej Godek
[not found] ` <CAPjoZodAaHLfPGb+XiUhoMJD7J4_kYrjRmYP+p1S5w5yuPgLEg@mail.gmail.com>
[not found] ` <CAPjoZoc12W4usGnkwSZG2zNqe8xF6C4hWWZgq+-Nc8HMg_Xw4Q@mail.gmail.com>
2013-04-04 15:11 ` Nala Ginrut
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='CA+U71=NqAL8Xj5mKvUNLEvN+Oi669xO3oSdCY+Dm0-HCGOTLPA@mail.gmail.com' \
--to=noah.b.lavine@gmail.com \
--cc=guile-user@gnu.org \
--cc=mandyke@gmail.com \
/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).