Questions, loose ends, misprints, etc. Andre van Tonder (01 Dec 2005 15:00 UTC)
Re: Questions, loose ends, misprints, etc. Matthew Flatt (01 Dec 2005 16:00 UTC)
Re: Questions, loose ends, misprints, etc. Per Bothner (01 Dec 2005 17:21 UTC)
Re: Questions, loose ends, misprints, etc. Matthew Flatt (01 Dec 2005 17:27 UTC)
Re: Questions, loose ends, misprints, etc. Andre van Tonder (03 Dec 2005 16:20 UTC)
Re: Questions, loose ends, misprints, etc. Andre van Tonder (03 Dec 2005 22:41 UTC)
Re: Questions, loose ends, misprints, etc. Jens Axel Søgaard (01 Dec 2005 16:49 UTC)
Re: Questions, loose ends, misprints, etc. Matthew Flatt (01 Dec 2005 16:58 UTC)

Re: Questions, loose ends, misprints, etc. Matthew Flatt 01 Dec 2005 16:01 UTC

I'll try to provide some quick answers. With most answers below, insert
"and I'll fix the document for the next draft".

At Thu, 1 Dec 2005 10:00:30 -0500 (EST), Andre van Tonder wrote:
> - Can I shadow CAR from the R6RS language, either with an import
>   or a local definition?  This kind of thing is potentially useful.
>   However, the document says: "No identifier can be imported multiple
>   times...", which seems to preclude this, unless the "language" is
>   conceptually not an import?

The "language" is meant to be an import, so shadowing with a definition
would not be allowed.

> - Is "scheme://r6rs" also a library?

Yes, that's the intent.

> - Related to previous: Does the language specification act semantically
>   like an import?

Yes.

> - Can I import different bindings for the same identifier into different
>   phases?

No. The intent is to disallow it.

> - Is the "language" imported into all reflective levels (no matter
>   how deep LET-SYNTAX is nested)?

Good question. I'll have to refresh my memory on this point, and
certainly the document needs more specification.

> - Would it be possible to provide a rationale for the notion of
>   indirect exports

Indirect exports ensure that that all access and mutations to
unexported bindings are apparent within the module (afer macro
expansion). Consequently, the programmer and the compiler can
potentially prove that certain bindings are always used in a certain
way, such as "this unexported function is never called with the wrong
number of arguments". This potential is particularly important for
optimizing compilers.

> - The IMPORT DSL makes me uncomfortable, since the directives do
>   not seem to compose.  For example, it would be nice to compose ONLY
>   and ADD-PREFIX.
>
>   However, this objection might be unfounded.  In fact, I think there is
>   a misprint in the document.  Shouldn't <X-set> be <import-set> in
>   this snippet?

Yes - that's the problem; `only' and `add-prefix' compose.

> - It would be more general, and would simplify the IMPORT DSL, if one could
>   specify arbitrary computations on imported identifiers.

This is disallowed for much the same reason that macros are not allowed
to expand to `import' declarations...

>   However, you may have other reasons for preferring a syntactic DSL.

To make the imports and (explicit) exports apparent without macro
expansion.

> - It would be nice if the toplevel could also be considered an implicit
>   library.

Ok, but I'll stand firm on the top-level-doesn't-exist view of this
particular SRFI.

> - Can I export an unbound identifier?  For example, can I export
>   literals (such as ELSE, UNQUOTE, etc.), or does this not even make
>   sense.

This doesn't make sense to me, at least. What would it mean?

Thanks for all the comments,
Matthew