About a minute ago, Sam Tobin-Hochstadt wrote: > On Thu, Oct 28, 2010 at 12:41 PM, Eli Barzilay <e...@barzilay.org> wrote: > > About a minute ago, Sam Tobin-Hochstadt wrote: > >> On Thu, Oct 28, 2010 at 12:29 PM, Eli Barzilay <e...@barzilay.org> wrote: > >> > Three hours ago, Matthias Felleisen wrote: > >> >> > >> >> On Oct 28, 2010, at 8:34 AM, Matthew Flatt wrote: > >> >> > > >> >> > None seem especially worth mentioning, but the internal-definition > >> >> > change could be mentioned if we need more to Say: > >> >> > > >> >> > * The `when', `unless', `cond', `case', and `match' forms (in > >> >> > `racket/base' and derived languages) now allow immediate > >> >> > internal definitions. > >> >> > >> >> Just for the record: allowing internal definitions all over the > >> >> place and mixing them properly with expressions has been one of the > >> >> best small changes of the decade. > >> > > >> > BTW, there's another one that I think should get the same: `begin0'. > >> > >> That would be weird. What do these do? > >> > >> (begin0 (define x 1) x) > >> (let ([x 0]) (begin0 x (define x 1)) > > > > I don't see what should be weird, those would be similar syntax errors > > to what you get from > > > > (begin0 (define x 1) (let () x)) > > This isn't any different from my first example. What did you mean here?
I mean that the suggested `begin0' that I'm talking about will be implemented with a `(let () ...)' around the body, and therefore the error that you would get with (begin0 (define x 1) x) is the same that you get now with: (begin0 (define x 1) (let () x)) > > (let ([x 0]) (begin0 x (let () (define x 1)))) > > What about > > (let ([x 0]) (begin0 x (define-syntax x #'1))) > > or > > (let ([x 0]) (begin0 x (define-syntax x #'1) 7)) > ? Same for all of these (first is a syntax error, second is 0). I don't see anything problematic or surprising. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev