This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 173: Unifying BEGINs

2011-07-10 21:45:20
WG1 - Core
alexshinn
major
cowan
fixed
source
closed
2011-05-06 03:40:39
defect

In R5RS, there are three kinds of BEGINs:

1) All subforms are expressions; this can be used wherever an expression can be used. (4.2.3)

2) All subforms are definitions; this can be used wherever an internal definition can be used. (5.2.2)

3) Subforms can be definitions or expressions intermixed in any order; this can be used only at top level. (In R7RS we extend this to module top level as well). (5.1)

In particular,

(define (x) (define y 32) (begin (define z 45) (set! y z)) y)

is not licensed by any of these provisions, and consequently is not valid R5RS Scheme. Nevertheless, all of my usual Schemes accept the above definition except Scheme48/scsh and SSCM -- actually, SSCM fails when you invoke x rather than when you define it. So I'm proposing that we unify them for R7RS.

resolutionfixed
statusnewclosed

We voted not to change this.