|
Re: Macros and Domain Specific Languages
|
Posted: Jul 15, 2006 10:03 AM
|
|
> > That "macro pre-processor which works as a type-aware > > pattern matcher" is equivalent with a typed functional > > language. > > Could you explain that?
Most term rewriting languages, which match patterns and rewrite them, are by their very nature a declarative programming language. Like XSLT for example. You can write loops, conditionals, etc.
However, whether the Cat macro pre-processor is technically a functional language, I don't think so yet, since it lacks the facilities to pass or return functions.
For those interested, the macro language has been broken away from Cat as a separate language, which I am calling "Catnip" for the time being.
I found that it cluttered up the Cat language definition to have the transforms as part of the language proper.
|
|