[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Library declarations in included files
On Mon, Jul 2, 2012 at 9:34 AM, Alan Watson <alan@x> wrote:
> Draft 6 states that the an include library declaration expands to the contents of the named files wrapped in a begin. However, this restricts included files to containing only commands and definitions and not further library declarations. One use of include is to separate the interface (i.e., the export declaration) and the implementation. However, this restriction on import makes this difficult, since the implementation will typically use imports and possibly cond-expands, but these cannot appear in the included file.
> I understand the WG has considered some aspects of libraries since draft 6. Have they fixed this?
We have not, as no one has considered it "broken".
It is very important to have a clean separation between
library declarations and Scheme code, so if we did
consider such an extension it would have to be separate,
e.g. (include-library-declarations "foo.sld").
If exporting the same interface is the only use-case,
we could also consider an (export-interface (foo)) to
export the same identifiers as library (foo). I was
considering such advanced library uses as a topic
for WG2 or later SRFIs.
Scheme-reports mailing list