hash tables not in class hierarchy. Why?

From: Harvey J. Stein <abel_at_netvision.net.il>
Date: Mon, 16 Dec 1996 20:00:53 +0200

A long time ago (circa v2.1.5, I guess) I asked about about why hash
tables weren't integrated into the type tree in STk. Consider:

   STk> (class-of 3)
   #[<class> <integer>]
   STk> (class-of (make-hash-table))
   #[<class> <unknown>]

What I wanted to do is define some generic access functions such as:

(define-method gassoc (item (table <pair>))
   (assoc item table))

(define-method gassoc (item (table <hash-table))
   (let ((value (hash-table-get table item #f)))
      (if value
          (list item value)
        #f)))

At the time, I just wrapped the hash table fcns with class
definitions.

I'm writing now because I recall reading that hash tables *were*
integrated into the class hierarchy. However, as the above
illustrates (STk 3.1.1 under linux), this doesn't seem to be the case.

So, is putting hash-tables into the class hierarchy something that's
on the queue? Or, do I need to just either live with the wrappers or
do it myself?

Thanks,

-- 
Dr. Harvey J. Stein
Berger Financial Research
abel_at_netvision.net.il
Received on Mon Dec 16 1996 - 19:08:27 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST