On Aug 3, 2011, at 12:30 PM, Andre van Tonder wrote: > On Wed, 3 Aug 2011, Alex Shinn wrote: > >> This could possibly be disastrous for implementor uptake, since one >> of the most common complaints against R6RS was its handling of >> top-levels, and specifically its forbidding of REPLs. > > R6RS didn't forbid REPLs.
The argument is not that r6rs forbids repls, (just as r6rs doesn't forbid r5rs scheme implementations from existing), but rather that r6rs prevents any repl (or pure interpreter) from claiming to implement r6rs itself because of the requirement in 5.5. (in particular the "must not be allowed to begin" part). The argument is that an r6rs implementation may include a repl, but that said repl cannot itself be a conforming implementation of r6rs. N.B. I make no claim that this argument is true - I'm not enough of a language lawyer; I'm merely presenting the argument as I've seen it put forth. A. R6RS, 5.5 "If a top-level or library form in a program is not syntactically correct, then the implementation must raise an exception with condition type&syntax, and execution of that top-level program or library must not be allowed to begin." B. From <http://groups.google.com/group/comp.lang.scheme/msg/63e07a0453b690fd?dmode=source&output=gplain&noredirect> quoting Sam Tobin-Hochstadt "Will Clinger and I have had a productive off-line discussion of our disagreements, and for the purposes of not further dragging this out, it suffices to say the following. 1. As Will correctly points out, an implementation of R6RS top-level programs that proceeded by reading a single form, and then evaluating that single form, before proceeding on the next form, would violate the semantics of the R6RS (at a minimum, the requirements of section 5.5). 2. As I have pointed out, implementations of the R6RS are free to provide a REPL which allows expressions and definitions entered at that REPL to interact with R6RS libraries and R6RS top-level programs. This REPL is not, in itself, an implementation of the R6RS." C. From <http://groups.google.com/group/comp.lang.scheme/msg/780b643e7a7928dd?dmode=source&output=gplain&noredirect> quoting Will Clinger "Helmut Eller wrote: > What is your definition of a REPL? > I naively assumed that the following R6RS program is a also a REPL: I have been using variations of the following statements interchangeably: * The R6RS forbids REPLs. * No REPL can implement the R6RS. * No REPL can implement the R6RS without violating the absolute requirements of R6RS section 5.5. * Any implementation that claims to provide a REPL that implements the R6RS is making a false claim. Your program is a REPL, but it is clearly not a REPL that implements the R6RS; in particular, it evaluates only side-effect-free expressions, not definitions or programs. If you were to claim that your REPL is an implementation of the R6RS, then you would be making a false claim as well as violating several absolute requirements of the R6RS. So long as you make no such claim, there's no problem. It appears that all implementors of the R6RS understand this point. Although most of them ship a REPL with their systems, none (to my knowledge) claim that their REPL actually implements the R6RS, and several of them explicitly acknowledge that their REPLs do not conform to the R6RS." warmest regards, Ralph Raffael Cavallaro [email protected] _______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
