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

[Scheme-reports] [mikemon@x: R7RS-small ratification vote]



Forwarded by request.

----- Forwarded message from Michael Montague <mikemon@x> -----

Date: Sun, 19 May 2013 07:48:19 -0700
From: Michael Montague <mikemon@x>
To: cowan@x, cowan@x
Subject: R7RS-small ratification vote

Please forward this vote to the list.

Full name (required): Michael Montague

Location (optional): Seattle, WA

Affiliation (optional):

Contact details (optional):mikemon@x

Statement of interest:
I discovered Lisp and Scheme over 25 years ago when I got to use a Lisp Machine for the summer. Over the past 20 or so years, I have implemented a number of Scheme interpreters, a Scheme bytecode compiler,
and an Emacs editor using Scheme as the extension language. None of these were ever released to the public. I was implementing an R5RS Scheme system when R6RS came out and I became discouraged.
I am currently implementing a R7RS Scheme bytecode compiler and runtime.

Vote (required): yes

Rationale (optional):
The R7RS is an incremental step from R5RS that keeps to the spirit of Scheme.

I have some issues with R7RS, none of which prevent me from voting yes to R7RS as it now stands. I believe that R7RS libraries are unnecessarily different from R6RS and I would like to see that fixed.

(1) the keyword define-library should be changed to something else, perhaps declare-library. All of the other keywords containing define (eg. define, define-values, etc) create bindings; define-library
does not. There is no binding created for <library-name>.

(2) I believe that include-library-declarations is unnecessary. include (and include-ci) should be able to include library declarations if used at the <library-declaration> level.
If you want to include code (which is not wrapped in a begin) in a library, then use (begin (include <filename>)).

(3) I believe that a library should have at most one begin and it should have the semantics of a body (though no expressions are required). This would make the semantics of library bodies clear and make
R7RS libraries much closer to R6RS libraries, with little loss in expressiveness.

(4) R6RS libraries without versions and import levels seem awfully close to R7RS libraries; could they be made closer to the same without losing the benefits of R7RS libraries? For example, assuming (3)
above, I believe that the following would be a valid R6RS and R7RS library (ignoring library vs define-library keyword).

(library (stack)

  (export make push! pop! empty!)

  (import (rnrs))

  (begin ;;; <----- all I did was add this to the example in section
7.3 of R6RS

  (define (make) (list '()))

  (define (push! s v) (set-car! s (cons v (car s))))

  (define (pop! s) (let ([v (caar s)])

                     (set-car! s (cdar s))

                     v))

  (define (empty! s) (set-car! s '()))))




----- End forwarded message -----

-- 
All Norstrilians knew that humor was            John Cowan
"pleasurable corrigible malfunction".          cowan@x
        --Cordwainer Smith, Norstrilia

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports