From: Brian Mastenbrook <[email protected]> Subject: Re: [r6rs-discuss] Proposed features for small Scheme, part 1: a stake in the ground Date: Mon, 14 Sep 2009 13:54:29 -0500
> Some R5RS Schemes provide two-pass semantics when forms entered at the > REPL are wrapped in a `begin': > > (begin (define foo (bar)) (define-syntax bar (syntax-rules () ((_) > 1))) foo) > > -> 1 in Scheme48, MIT and Gauche. It's an error in PLT (R5RS mode), > Larceny (R5RS mode), Gambit (hygienic mode), Chez 7.4d, SISC, and > Bigloo. In Gauche that behavior is rather an unintended consequence of its compilation strategy (compile then execute for each toplevel form). define-syntax is dealt with compilation time but the actual evaluation of rhs of foo is done at execution time. In the development trunk the form raises an error. I've seen users confused by toplevel forms behaving differently when wrapped by begin. I like to follow a better REPL semantics if one is ever agreed. --shiro _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
