chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] hash-table with missing keys


From: Michele Simionato
Subject: [Chicken-users] hash-table with missing keys
Date: Wed, 18 May 2005 05:35:10 -0400

This is one thing I always wanted to ask: what's the rationale for

(hash-table-ref h 'non-existing-key)

returning #f instead of an error? In this way I am never sure if I have
found a key associated to a false value or if the key was missing.
I guess there is some backward compatibility reason, otherwise
the only reasonable behavior for

(hash-table-ref h 'non-existing-key)

is to return an error unless I specify a third argument, such as

(hash-table-ref h 'non-existing-key #f)

Am I missing something?

              Michele Simionato




reply via email to

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