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

macros expanding into definitions



** > I'm still not sure that I want to screw around with internal defines,
** > but if we must, I might actually like to see internal defines start a
** > new scope and have previous assignments refer to outer scopes. Doesn't
** > ML have something like this (at least at top-level).
** 
** I think this approach would presents a new problem. Consider the following:
** 
** (define (fib x)
**   (define (fib-even x) 
**   ...
**   (define (fib-odd x)
**   ..
**   ((if (even? x) fib-even fib-odd) x))

Oh, I know that my suggestion would ruin the expansion of define into
letrec.  I was really just trying to make a point that I don't think
that it is particularly advisable or possible to make top-level and
internal defines consistent and non-confusing to the 'naive' user. I
think we should leave internal defines alone except perhaps to deal
with the order of initialization problems. Not that it really matters
to me, since I don't suspect that I will ever use internal defines
anywhere except at the beginning of blocks to bind lambda expressions.
The only proposal which would be inconsistent with my uses of internal
defines would be my proposal.

-Mark