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

Re: Crash course on macros?



> From: Hugh Greene <q@tardis.ed.ac.uk>
> Subject: Re: Crash course on macros?
>
>> Rob wrote...
>> 
>> Imagine you're explaining this to someone who's rather confused by it...
> 
> Yeah, I know; I was trying to give an extreme summary of the relevant bits
> of DRM, to save Nolan buying one, but maybe that wasn't such a good plan
> ;-)

I hasten to add that I meant myself here... :-)

> Wading through the grammar, I think that your "define" example works
> because the "klin = 2" parses as a /binding-pattern/, in which '=' is
> expected/allowed to appear without a preceding '\'.

This makes sense. Strangely, auxiallary non-definer rules with = in parse
but don't seem to match in d2c. And \= just doesn't work. I haven't mapped
this fully yet, though. In theory we could replace (=) with ( , ) in d2c
code, although this would destory the meaning of the macro somewhat.
 
> This would all be much easier with a copy of the DRM to virtually point at
> ;-)  Hmm, I wonder how hard it would be to find a copy of the DRM (or DIRM
> -- "Interim DRM") on the web, starting from, oh, say,

The DRM is available online at the Gwydion Web site in the documentation
section:

http://www.gwydiondylan.org/

Fun-O are doing a special offer on the Dylan Reference Manual and the Dylan
Programming book at the moment. If anyone is interested in Dylan and doesn't
have a copy of these, they are both well worth owning in hardcopy.

http://www.functionalobjects.com/

- Rob.



References: