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

Re: [Scheme-reports] scheme-report-environment/null-environment only for R5RS

Per Bothner scripsit:

> The scheme-report-environment and null-environment function take
> a version number - but only 5 is specified.  That seems strange.
> Specifically, version 7 does not need to be supported.

Correct, as these procedures exist only in the (scheme r5rs) library.
It's not even clear what they would mean with an argument of 7; see below.

> Perhaps an editorial note that these routines are only for
> compatibility with R6RS and not recommended for new code?

R5RS, rather.  That's why they're only in that library, just as in R6RS
they were only in the (rnrs r5rs) library (and only required 5).

> Perhaps it makes sense to add a note that
>     (scheme-report-environment 5)
> is equivalent to
>     (environment '(scheme r5rs))

That's just what the description says, in prose rather than Scheme.

> Non-editorial:  Should one define
>    (scheme-report-environment 7)
> perhaps as:
>    (environment '(scheme all))

There is no such library.  We discussed it, but the WG consensus was that
it didn't make sense: you only know what's in it if you know exactly
which underlying libraries your implementation provides.  In R6RS all
libraries are mandatory, so it's not an issue.

It's already a problem that you don't necessarily know what's in the
(scheme r5rs) library:  if you don't have (scheme read), your R5RS
library probably doesn't have `read` either.

> This part is non-editorial - should there be a library
> corresponding to:
>    (null-environment 5)
> Perhaps:
>    (environment '(scheme r5rs null))

I think the null environment is an anachronism.  It made some sense in the
R4RS context, which had neither `eval` nor environments, but planned to
add them, and the syntactic keywords were a fixed list.  But syntactic
and variable identifiers are mostly on a par nowadays, and what's the
point of a library having one but not the other?  If you've used it in
anger, I'd like to hear about it.

John Cowan    cowan@x    http://ccil.org/~cowan
This great college [Trinity], of this ancient university [Cambridge],
has seen some strange sights. It has seen Wordsworth drunk and Porson
sober. And here am I, a better poet than Porson, and a better scholar
than Wordsworth, somewhere betwixt and between.  --A.E. Housman

Scheme-reports mailing list