Re: scheme-script organization created
Marc Feeley 26 Jun 2021 12:42 UTC
> On Jun 26, 2021, at 8:17 AM, Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:
>
> Am Sa., 26. Juni 2021 um 14:03 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
> Thanks for the feedback!
>
> > `scheme-script' is part of R6RS and is assumed to point to an
> > implementation of R6RS. I wouldn't reuse the name for interpreters of
> > other Scheme dialects as this can cause confusion or can clash with
> > existing R6RS implementations in the search path.
>
> scheme-script in the non-normative appendix, not in the normative standard.
>
> That's irrelevant here; R6RS systems like Chez *do* provide this binary with the semantic as adviced by the appendix of R6RS.
>
> An implementation of R6RS (without further qualification) is also not
> useful for writing practical code with environmental dependencies.
>
> I would consider the ability to declare dependencies (listing the
> required libraries/modules/eggs; acceptable version ranges for each;
> supported RnRS editions; and supported Scheme implementations) inside
> the script file itself to be a requirement for a useful scheme-script.
> How to do that in detail should be worked out; a collection of real
> scripts is a good litmus that the spec is useful.
>
> So a script shall be something very different than a top-level programm?
>
> > SRFI 22 suggests `scheme-XXX' where XXX corresponds to the version of
> > Scheme.
>
> IMHO that's going back in the direction the bad old days of general
> incompatibility :) We've standardized Scheme's library system, where
> before we used to have incompatible module systems in each
> implementation. We can standardize a cross-RnRS-compatible and
> cross-implementation-compatible scheme-script as well.
>
> I don't want to discourage you to do this, quite the contrary. Just don't use a name that is already used for something more specific. :) There are plenty of possible names, so there is no need to overload `scheme-script'.
>
I think it is fair to use the scheme-script name for scripting that doesn’t assume a specific version of Scheme. A cond-expand could be used in the script (and probably has to for short-term portability) to support both R7RS and R6RS (and R5RS). There could be a specific scheme-r6rs for scripts that are specific to R6RS (SRFI 22 had suggested the name scheme-rNrs such as scheme-r4rs and scheme-r5rs).
Marc