Hi --

On Tue, 3 Aug 2004, James Britt wrote:

> Joel VanderWerf wrote:
> > George Moschovitis wrote:
> > 
> >> Hello everyone,
> >>
> >> one of the features of the LISP family of languages that is missing from
> >> Ruby are macros. I think they are useful on a lot of occasions so
> >> I would like to see Ruby support macros in the future.
> > 
> > 
> > What you have defined are more like C macros, rather than LISP macros, 
> > which are hygienic (they operate at the level of syntactic elements, 
> > rather than characters).
> 
> Would Ruby macros, in the Lisp sense, have to manipulate the AST?
> 
> And a question (ideally) for Matz, but comments from anyone else are of 
> course welcome:
> 
> Would true macros in Ruby be more prone to abuse than they are in Lisp?
> 
> Is there something different about Ruby such that what (supposedly) 
> works to such acclaim in Lisp would be inappropriate in Ruby?

I'm answering from not very much knowledge of Lisp, and I know the
meta-meta-meta people disagree :-) but in the form this idea has
always been represented to me -- namely, as a way to introduce
essentially arbitrary syntax -- I've found it unappealing.  I think
Ruby can be great for application language things, but the idea of
having {} or . mean new things doesn't do much for me.

I guess I prefer to think of Ruby as a language with a certain syntax
than as a kind of host environment for syntax definition.  That's
partly because I like Ruby's syntax, and I think Matz is better at
designing syntax than most of us would be :-)  And also because the
thought of having to learn new syntax for, potentially, every program
is daunting.


David

-- 
David A. Black
dblack / wobblini.net