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

Re: [plt-scheme] The same macro problem

On Thu, 23 May 2002, Matthias Felleisen wrote:

> Eli, you're correct in that the macro systems introduces a phase
> separation, which means -- by definition -- that the language
> becomes "less dynamic." At the same time, you need to consider
> the idea of what this dynamics buys you. Based on my macro experience
> from the 80s, macros without phases are much more of a danger than 
> a benefit. Time to figure out a phase and a scope separation. Matthew
> finally figured this out, and I am grateful. 

My experience is rather different (even from 70s, one of the first
implementations of scheme).  We ARE USING dangerous language.  Anybody
outside functional programming circles shown call/cc is definitely 
terrified, esp. after s/he tries to use it.  For my students, it is
much more harder to control than low-level macro stuff.  I enjoy
syntax-rules as very good mechanism for writing simple macros, but
syntax-case is actually more complicated than low-level macro stuff.

This said, I am on the Eli's side.  There is an approach to programming
(which we call authoritarian) that you should only give "safe" tools
to programmers.  I've seen many languages based on this, which nobody
uses anymore.  On the other side, "democratic" approach says "Programmers
are intelligent, just don't put any barrier (this is how Scheme was 
originally conceived) and they select appropriate ones for each job.
Of course, you have to teach them first. 

For me, I would like to have hygienic macros for typical tasks (I always
try to use them first) and low level define-macro tools which allow me
to do anything I like (even if I cheat sometimes with them) - e.g.
as transformer procedures, which I could put in define-syntax instead
of syntax-rules.

> Having said this, I don't imply that your Swindle problem cannot be
> solved in our world. Matthew, Robby and you should look at it off-line 
> to see where the problem is. 

Everything can be written in any language (assuming one can simulate
Turing machine or Markov automata with it) -- the problem is whether
the solution will be clear. 

Sorry for my philosophic remarks, but as I am using DrScheme stuff a lot
now I obviously try to push it into my own direction.

Zbyszek Jurkiewicz

> -- Matthias