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

Re: Questions, loose ends, misprints, etc.

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.

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?


> - 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

> - 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,