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: So, who's maintaining the module registry?



jimb@red-bean.com writes:
> 
> > I for one would like to start getting database interfaces generally
> > available.  Mind you, I haven't written any of the current interfaces, but
> > I'm able to put my time into this and unless someone else wants to, I will
> > :)
> 
> Great!  Those who code, win.  :)
> 
> I think for now, namespace questions should go to this list.
> Hopefully, we'll have guile.org set up soon, and modules@guile.org
> will be the right place.  
> 
> I do think we need a top-level category for database stuff.  If the
> name for our currently vaporous and undesigned uniform RDB interface
> is DBI, then how about
> 
> (db dbi TARGET)
> 
> where TARGET is some designation of what you're talking to.  Something
> goes in (db dbi ...) if it implements the DBI interface.  Thus, (db
> dbi postgres), (db dbi oracle), etc.

What I personally think would be best is if (db dbi) implemented most
of the generic interface, and each (db dbi TARGET) implemented a
specific back end - this could work by each (db dbi TARGET) exporting
a constructor function for that type of database, and (db dbi)
providing generic accessors. This couold be handled by having a vtable
of C functions in the SMOB for instance.

It would suck for each back end to have to reimplement the
interface. It would especially suck if you could only use one easily
interface at once because they exported functions with the same names.

My database knowledge is pretty close to zip though, so someone who
will be coding it should work out the design.

There is still the question of whether (db ...) or (database ...) is
the right prefix - this being the age-old battle between brevity and
precision. People have spoken in favor of both (including privately to
me). Does anyone have a really strong opinion on this, backed by a
good reason?

 - Maciej