Re: [Scheme-reports] Proposal to add fexprs John Cowan (18 Nov 2013 22:38 UTC)
Re: [Scheme-reports] Proposal to add fexprs Sascha Ziemann (20 Nov 2013 19:45 UTC)
Re: [Scheme-reports] Proposal to add fexprs Eli Barzilay (20 Nov 2013 22:41 UTC)
Re: [Scheme-reports] Proposal to add fexprs Sascha Ziemann (21 Nov 2013 09:07 UTC)
Re: [Scheme-reports] Proposal to add fexprs Eli Barzilay (22 Nov 2013 16:03 UTC)

Re: [Scheme-reports] Proposal to add fexprs John Cowan 18 Nov 2013 18:50 UTC

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.

Very nice!

> 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
<http://conal.net/blog/posts/the-c-language-is-purely-functional>.

--
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@ccil.org

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports