[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: put library <body> at top-level

This page is part of the web mail archives of SRFI 83 from before July 7th, 2015. The new archives for SRFI 83 contain all messages, not just those from before July 7th, 2015.

At Wed, 30 Nov 2005 12:33:37 -0800, Per Bothner wrote:
> I don't see any rationale for
> (library <lib-path> <language>
>       <body>)
> rather than identitying a library with a file, [...]

Consider an e-mail message like Andre's, which includes multiple
library definitions. If a library is identified with a file, then the
e-mail author must invent an ad-hoc notation to indicate the names and
content of files. The syntax above essentially standardizes the

Others can offer additional arguments. I know, for example, that some
would like to include multiple library definitions in a single file,
and others object more generally to the notion of "file" in a
specification of syntax.

Overall, it may be best to think of the SRFI's syntax as an interchange

> More importantly, there are practical advantages of declaring
> that library==file.

Suppose you have

 1. An implementation that connects files to libraries, and

 2. tools that pack and unpack library files into the SRFI's stream format.

Doesn't that preserve most of the practical advantages? (For example,
PLT Scheme connects libraries and the filesystem, and it will be easy
to write packing and unpacking tools for PLT Scheme.)

> There is
> too much indentation and parentheses as it is

We need a notation to group a module declaration with its body. What
else would Scheme use but parentheses? :)

> Also, the proposal is unclear about non-libraries:  Can I import
> a library into "the top-level"?

This is intentionally unspecified, as noted in the rationale.

I'm not (for now) arguing against specifying the top level. I simply
advocate tackling modules, first, and leaving the top level to later.