[racket] empty hash tables

From: Marijn (hkBst at gentoo.org)
Date: Mon May 30 04:35:13 EDT 2011

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/30/11 10:30, Marijn wrote:
> Hi Pierpaolo,
> 
> On 05/30/11 10:24, Pierpaolo Bernardi wrote:
>> BTW, since the topic of empty tables has been brought up: I am often
>> (mildly) annoyed by the fact that make-hash takes 0 or 1 argument,
>> while make-immutable-hash takes only 1 argument, forcing me to write
>> (make-immutable-hash '())..
> 
>> Is there a reason for this lack of simmetry?
> 
>> P.
> 
> `make-immutable-hash' is for constructing immutable hashes from
> association lists; `hash' is the immutable equivalent of `make-hash'.

Sorry for my hasty wrong reply; the docs say that `make-hash' and
friends also take association lists, so `hash' and friends are the odd
ones out, taking `key value' as alternating arguments...

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3jVsEACgkQp/VmCx0OL2zoeACbBAvRY8eDjn3Ch+RcQZHCyPyE
LYQAni7dcAjk/cQ0fqFvp3EFtYEM6fB2
=mXzl
-----END PGP SIGNATURE-----


Posted on the users mailing list.