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

r^2 vs. r^3

    Date: Wed, 4 Mar 87 11:19:50 EST
    From: bill coderre <bc at MEDIA-LAB.MEDIA.MIT.EDU>


    What are the significant differences between the Revised2 and Revised3
    Reports on Scheme?

The changes in the language are mostly trivial.  I'd say the most
visible changes are (1) the boolean constants are written #T and #F
instead of #!TRUE and #!FALSE and (2) a number of peripheral and/or
redundant features have been removed or simplified.

As for the report itself, the R^3 report has some additional
description, e.g. formal semantics & syntax, and its organization is
somewhat different in places.

For completeness, I'll list all the changes of which I'm aware, not just
the significant ones.  This list appears in the "notes" section of the
r^3 report.  What constitutes a "clarification" as opposed to an
"incompatible change" is subjective; this is my own classification, not
that of the (other) authors.

New features: 
 - DELAY and FORCE (as in Abelson & Sussman's book)
 - New predicates BOOLEAN? and PROCEDURE?
 - ATAN now admits either one or two arguments.
 - ^ is now extended alphabetic.

Features removed:
 - NAMED-LAMBDA and REC are both gone.
 - "Curried define", e.g. (define (((f x) y z) w) ...), has been removed.
 - A number of things had more than one name in the R^2 report; now everything
   has only one name.  Thus SEQUENCE, <?, <=?, =?, >=?, and > are gone.
 - A number of marginal procedures have been flushed, namely:
 - The #!NULL syntax for the empty list is gone (use () instead).

Incompatible changes:
 - The boolean constants are now written #t and #f instead of #!true and
 - (define (foo ...) ...) now means (define foo (lambda (...) ...))
   instead of (define foo (letrec ((foo (lambda (...) ...))) foo)).

Technical clarifications:  [In many of these cases, the r^2 report was at
variance with what the way various implementations behaved, and it seemed
better to change the report than to change the implementations.]
 - The objects returned by literal expressions (e.g. '(a b)) are permitted
   to be immutable.
 - The list to which a rest-argument becomes bound must be newly allocated.
 - DO variables are updated by rebinding rather than by assignment.
 - Backquote allows vectors and nesting, and there's an official read/print
   syntax for backquoted forms (so you can know what you get if you say
   '`(a ,b) ).
 - EQ? on equal numbers is unspecified.
 - Implementations are permitted to do things like
    (EQ? (LAMBDA (X) X) (LAMBDA (Y) Y))  =>  #T.
 - EQV? distinguishes exact numbers from inexact ones, even if they
   are equal according to =.
 - List, string, and vector indexes must be exact integers.

Someone else will have to answer your question number two.

- Jonathan