Re: howto use defmacro.



"db" == Dan Bensen <randomgeek@xxxxxxxxxxxxxx> writes:

>>> Beginners don't care about the subtle semantic nuances behind
>>> the syntax, interactions with packages, etc., they just want a
>>> simple system that allows them to start doing the basics. And
>>> there's nothing simpler than a visual template of the code.

db> Stefan Mandl wrote:
>> I think that the "template"-model really sets beginners on a
>> wrong track which will confuse them a for a long time until
>> they realize what's really going on. I wish I had been given
>> Pascal's advice when I was learning about macros.

db> Yes, it's too bad if you weren't. But that doesn't mean it
db> should be the first explanation you ever see, especially as an
db> introductory example of how macros are "simple". Anyway,
db> there are lots of things that confuse beginners, so I think
db> it's good to start them with simple templates and build up
db> from there. I don't think it causes long-term confusion, but
db> that's just my opinion.

As either a newb, or someone who was recently a newb, I have to agree
with Pascal and Stefan. I didn't really start to understand macros
until I read _On Lisp_ and started writing functions to generate what
I wanted expanded.

The classic template-style examples for macro writing are misleading
because they lead you to believe that a macro is almost like a
function, except for some wierd commas and backquotes.

Pascal's advice would have helped me too, because it gets you
immediatly to the heart of the problem.

-- Joe


PS: to Dan -- sorry about the e-mail, I used the wrong post command!
(see, once a newb...)
.