guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add-native-hashtable-helper-functions


From: Nala Ginrut
Subject: Re: [PATCH] Add-native-hashtable-helper-functions
Date: Wed, 27 Mar 2013 21:55:26 +0800

On Wed, Mar 27, 2013 at 9:33 PM, Mark H Weaver <address@hidden> wrote:
address@hidden (Ludovic Courtès) writes:

> Nala Ginrut <address@hidden> skribis:
>
>> +(define (hash-keys table)
>> +  "Return all the keys from hash table."
>> +  (hash-map->list (lambda (x y) x) table))
>
> That doesn’t seem sufficiently common to warrant a new procedure.  WDYT?

FWIW, I think it would be reasonable to add 'hash-keys'.  Many users
are accustomed to writing in a style that's made more convenient by
'hash-keys', and in cases where efficiency is not crucial, I think
it's a fine style.  Also, sometimes the values aren't needed.

IMO, we can afford to add a few conveniences such as this.


Thanks for saying that.
And please consider 'hash-items' implemented with hash-count, it's common as well.

And I'm not sure about hash-size myself, I won't insist on it.

Thanks!
 
      Mark



reply via email to

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