unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Functional hashtables
@ 2020-05-05 18:10 Christopher Lemmer Webber
  2020-05-05 19:45 ` Linus Björnstam
  2020-05-16 20:42 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Christopher Lemmer Webber @ 2020-05-05 18:10 UTC (permalink / raw)
  To: guile-user

Hello hello,

I'm working on porting a library I've written from Racket to Guile.
Some interesting news on that soon.

In the meanwhile, I'm trying to figure out what to do about my need for
functional hashmaps in Guile.  Right now Guile ships with vlist and
vhash.  Andy also wrote fash.scm, which is what I've generally preferred
and used previously.

The reason I don't want to use vhashes is specifically this part of
vhashes in the Guile manual:

>   • It is _not_ thread-safe.  Although operations on vlists are all
>     “referentially transparent” (i.e., purely functional), adding
>     elements to a vlist with ‘vlist-cons’ mutates part of its internal
>     structure, which makes it non-thread-safe.  This could be fixed,
>     but it would slow down ‘vlist-cons’.

Oop!  That's a no-go for me.  But maybe there are other reasons to
prefer fash.scm too?

There's no separate package of guile-fash available anywhere, but it
would be easy enough to do if we're just using it with Guix.  It's
desirable to not have to keep copy-pasta'ing fash.scm around at least.

My time in Racket has convinced me that it's an extremely good idea to
have a well supported functional hashmap type in the language... extra
points if it's "first class" in syntax (my code has improved
considerably because of it; no more using alists where they'll bite you
later just because it "looks prettier").

Anyway, thoughts?

Nice to be back in Guile land!
 - Chris



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-17  7:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 18:10 Functional hashtables Christopher Lemmer Webber
2020-05-05 19:45 ` Linus Björnstam
2020-05-06 11:23   ` Christopher Lemmer Webber
2020-05-06 11:24   ` Christopher Lemmer Webber
2020-05-06 13:32     ` Linus Björnstam
2020-05-06 18:29     ` ArneBab
2020-05-08 18:11       ` Christopher Lemmer Webber
2020-05-16 20:42 ` Ludovic Courtès
2020-05-17  7:31   ` Catonano

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).