Re: Add internal definitions to derived forms

2022-11-18 Thread Linus Björnstam
Hi! Well, the point of the change is to make it so that things other than expressions are allowed. I change it to say @var{body}, and then later clarify that @var{test} is an arbitrary expression and @var{body} is a lambda-like body. Which when reading it now sounds... not very good. Would

Re: Add internal definitions to derived forms

2022-11-18 Thread Lassi Kortela
Would "is like the body of a lambda" be a better wording? R7RS section 3.5. says: (lambda * * ) The * are the stuff you are adding.

Re: Add internal definitions to derived forms

2022-11-18 Thread Linus Björnstam
On Fri, 18 Nov 2022, at 10:27, Lassi Kortela wrote: >> Would "is like the body of a lambda" be a better wording? > > R7RS section 3.5. says: > > (lambda * * ) > > The * are the stuff you are adding. Not quite. Guile extends the lambda body (and by extension let-forms) to allow mixed definitions

Re: Add internal definitions to derived forms

2022-11-18 Thread Lassi Kortela
Not quite. Guile extends the lambda body (and by extension let-forms) to allow mixed definitions and expressions: (lambda () (display "Heippa!") (define routsi #t) (and (read) routsi)) which expands to, more or less, a letrec*. All in accordance to the paper fixing letrec(reloaded).

Re: Add internal definitions to derived forms

2022-11-18 Thread Linus Björnstam
On Fri, 18 Nov 2022, at 11:22, Lassi Kortela wrote: > R7RS defines the syntax of `let` et.al. as follows (section 3.5): > > (let (*) ) > > Where: > > = * > = * > > So their definition of lambda: > > (lambda * * ) > > could be abbreviated: > > (lambda ) > > I haven't read "Fixing letrec" but i

Re: Add internal definitions to derived forms

2022-11-18 Thread Lassi Kortela
That is a better way to write it indeed. clause-body being equal to a lambda body. Thank you. No problem. Nb. I made an oversight - the section of R7RS with the grammar I quoted says: "These were derived from rules in the grammar given in chapter 7 by replacing some occurrences of with ,