This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scheme is too complicated



> One interface I'm familiar with is the one which makes an underlying
> database file look like an associative array (aka hash table).  This
> would mean (make-hash-table) would take some extra args (such as file
> name) & the hash table access routines would be different depending on
> the type of hash table created (gdbm, berkeley db, ...).

I think there are two levels we're working on here.

There are ``database engines'', which are things that support SQL.
SQL queries are way more sophisticated than hash tables, and it
doesn't make sense to squeeze what they do into the hash table form.

Then there are ``database managers'', which basically just maintain
mappings from strings onto strings.  This is GDBM, NDBM, and so on.
Those, I think should have interfaces that imitate make-hash-table.

What crummy terminology; are there better terms?

(BTW, I don't particularly want to overload Guile's hash table
functions this way.  If someone wants to pay the price of portability,
they can call database manager functions that happen to use hash
tables as a back end.  But make-hash-table and hash-ref should stay
simple.)