Re: Providing features through the storage class Bradley Lucier 19 Sep 2015 21:53 UTC

On 07/31/2015 11:31 PM, John Cowan wrote:
> Bradley Lucier scripsit:
>>> In addition, a standardized sparse-storage-class would be a Good Thing.
>>> This would use a hash table or similar object as its backing store.
>> I'll think about how to do this.
> The getter would be hash-table-get, the setter would be hash-table-set!,
> the checker would be (lambda (x) #t), the maker would be (lambda (x)
> (make-hash-table)), and length would return the max fixnum or something
> like that.

Do you expect the table to be fully populated?  If so, a generic storage
class would be better.

Or do you expect a default value returned from the getter when asked for
previously unset values?