On Sun, Sep 10, 2017 at 11:40 AM, Peter Bex <[email protected]> wrote:

This same inconsistency crops up in (scheme lazy), which has
> delay, delay-force, force, promise? and make-promise, whereas
> the scheme module has delay and force.
>

As the main inventor of the R7RS-small modules, I would advise not getting
hung up on them.  They exist primarily to make things optional for truly
small R7RS-small implementations.  For example, the R5RS numeric tower
makes inexact numbers optional, even though only subminimal and blatantly
non-confirming Schemes (SigScheme, Mini-Scheme, Oaklisp, Owl Lisp in my
test suite) actually omit them.

So in practice (scheme inexact) could have been folded into (scheme base).
It isn't, because R7RS-small is not entirely about practice, but also about
extending downward the range of what counts as a conformant Scheme, say one
that compiles code to run on a microcontroller with no hardware floating
point.  (Similarly with the (scheme case-lambda) module, which is there
because Alex Shinn, who hates the case-lambda macro, insisted on it.)

Again, we could put delay-force, promise? and make-promise into
> (chicken base) _and_ make an aliasing module (chicken lazy)
> that has both the extended and r5rs procedures, but that seems
> awkward and annoying when you import both; you'd get constant
> warnings about re-importing identifiers.


I would not expect a warning about importing the same binding of an
identifier through more than one path: if you define a module foo that
re-exports identifiers from the base module, and then write bar importing
both the base module and foo, you should not (and do not, in Chicken or
Chibi) get a warning.


> OTOH, putting it just
> under (chicken base) might result in the aforementioned confusion
> for people familiar with r7rs.
>

I at least would expect (chicken base) to be a base module incorporating at
least the intersection of (scheme base) and (scheme r5rs), given that
Chicken is R5RS-based.  Most people add an import when they get (or know
they will get) an undefined-variable error, and Chibi's advanced REPL
("chibi-scheme -R") will helpfully search the library for a module that
defines such a variable.

Tl;dr:  merge these small modules into (chicken base).

-- 
John Cowan          http://vrici.lojban.org/~cowan        [email protected]
Principles.  You can't say A is made of B or vice versa.
All mass is interaction.  --Richard Feynman
_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to