[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Proposal to add fexprs
Alaric Snell-Pym scripsit:
> And the rule that made the macros second-class was that no macro values
> could remain in the input to the compiler once macro expansion was
> complete. In other words, all expressions that computed macros
> (generally in order to "apply" them, as they're not much use otherwise)
> had to be computable at compile time.
> So you could write "((if x a b) y z)" to choose which of two macros, a
> or b, to use; and as long as x could be reduced to a literal at compile
> time, that was JUST FINE. But if it couldn't, then the output of the
> expander would still include a and b (no longer just the symbols, of
> course, but the propagated actual macro values), and it'd be rejected by
> the compiler.
> This was all good fun, and easy enough to do in a pure functional
> dialect of Scheme (mutation really bungs up the kind of aggressive
> constant propagation and inlining I was doing), but would be hard to
> scale to a Scheme with mutation!
Well, you could limit mutation to run time only. See Conall
Elliot's wonderful post "The C language is purely functional" at
Deshil Holles eamus. Deshil Holles eamus. Deshil Holles eamus.
Send us, bright one, light one, Horhorn, quickening, and wombfruit. (3x)
Hoopsa, boyaboy, hoopsa! Hoopsa, boyaboy, hoopsa! Hoopsa, boyaboy, hoopsa!
--Joyce, Ulysses, "Oxen of the Sun" cowan@x
Scheme-reports mailing list