guile-user
[Top][All Lists]
Advanced

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

Re: Modifying nested dictionary/alist type data


From: Andreas Rottmann
Subject: Re: Modifying nested dictionary/alist type data
Date: Fri, 15 Apr 2016 19:20:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Paul Morris <address@hidden> writes:

> Hi, I’m rewriting one of LilyPond's C++ routines in Guile/Scheme in
> order to customize it for my own use, and it uses some nested
> dictionary/map/alist-style data structures that you can modify using
> something like this in C++:
>
>   mydata[aaa][bbb].ccc = 10;
>
Depending on the number of entries in each nesting level, and other
(performance/space) tradeoffs, hash tables might be a good fit as an
associative array data structure:

https://www.gnu.org/software/guile/manual/html_node/Hash-Tables.html
http://srfi.schemers.org/srfi-69/srfi-69.html
http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-14.html

Guile 2.0 supports all three of these APIs -- choosing between them is
mostly important if you care about portability to different Scheme
implementations (which I'd guess is not high priority in the context of
lilypond).

HTH, Rotty
-- 
Andreas Rottmann -- <http://rotty.xx.vu/>



reply via email to

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