[Top][All Lists]

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

Re: guile-json 0.2.0 released

From: Daniel Hartwig
Subject: Re: guile-json 0.2.0 released
Date: Mon, 8 Apr 2013 10:11:44 +0800

On 7 April 2013 19:40, Panicz Maciej Godek <address@hidden> wrote:
> 2013/4/5 Taylan Ulrich B. <address@hidden>
>> > All in all, you don't write vector->list and list->vector to get a
>> > nice printable representation of vectors -- there was an issue, and it
>> > has been solved.

There was never an issue.  Vectors have a read syntax that any vector
can be unambiguously displayed as.  Hash tables do not share this

>> > Racket has its printable representation of hashes,
>> > which is much nicer than the one of guile (although still not
>> > perfect).
>> How important these matters are is very subjective I guess.  To be
>> honest, I don't have a strong opinion at all, but was writing what I
>> believe would be the stance of most Guile developers.  If you believe
>> these features to be important for the larger Guile user-base, you might
>> want to bring that to the attention of developers (perhaps already
>> achieved with these mails), or send patches. :)
> Well, actually I was hoping to bring attention of developers :)
> After the discussion I agree that ordered hashes aren't so important, but
> the printable representation and read syntax for hashes (or at least some
> sort of hashes) and unordered sets would be comfortable and I believe it
> wouldn't hurt (although Daniel Hartwig in one of this posts' follow-ups
> claims that it could be misleading, but I'm not sure if we understood each
> other entirely)

To clarify: it is misleading to have a format that will display the
contents of some hash tables, and not others.  This is, e.g. defining
a read syntax for a blessed type of hash-table.

Just which pair of equality and hash procedures constitutes the
“common case” for Scheme code?  In other languages, there is a well
established, primary equality test which the builtin map type is
defined for.  This is not the case for Scheme where any particular
application is equally likely to use ‘eq?’, ‘eqv?’, ‘equal?’, or
other.  It is highly application specific to the point of varying
within a single program, and guile rightly does not bless one
particular choice over the others.

Nothing prevents an application from making its choice and using e.g.
srfi-105 to provide a suitable read syntax.

As a final comment.  You mentioned writing configuring files using
hash tables.  This is quite common in some languages, though for lispy
programs I note they are more often configured using straight $lisp
source file or module.  See, e.g. emacs and tekuti.


reply via email to

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