Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where should guile modules store meta data?
thi <email@example.com> writes:
> one concern is that searching for `load' is regularized when there is a
> one-to-one correspondance between module names and dir/dir/file names.
I think the mapping of module names to file names is independent of whether
there is one or two files per module ... maybe I misunderstood.
> a two-file system, on the other hand, makes it easier to wrap guile
> around arbitrary scheme code, and this is a major win, IMHO.
In a one-file system, you can achieve this with writing the define-module
and then using load to insert the code proper (this has the added advantage
that the files for the imported code don't have to adhere to Guile's file
layout, it's simpler to adapt the wrapper to an updated version of the
imported code etc.)
> perhaps the load mechanism should adopt the two-file system by
> recognizing files w/ extension .scmh either preferentially, or w/ the
> understanding that reading ./FILE.scmh means ./FILE.scm should also be
I just dislike C's two-file approach a lot: it forces you to maintain the
same information in two files simultaneously, which is a major
inconvenience. If the module system needs separate header files, they
should be auto-generated from the one module file in a process that should
be as painless as possible for the user. Using auto-generated headers, if
that's necessary, also offers a great deal more flexibility in changing
what should be in the header file without burdening the user with endless
hours of cutting and pasting stuff from the implementation to the
Guile Home |
Main Index |