lith wrote:
>> The enabling feature of Lisp which makes its macros possible is
>> homoiconicity
> 
> It makes things easier and more elegant. Basically, you could also use
> a parser of sorts (ruby 1.9 comes with ripper), make your
> transformations, and then generate a string or sexp that is then
> evaluated. One could use e.g. the polyglot gem to let source files be
> read by such a macro pre-processor. In comparison to the lisp approach
> that would be terribly complicated and fragile though.
> 
> I know of 2-3 efforts to implement macros in ruby. Maybe the OP would
> be interested in those approaches.

Thanks, everyone for the responses. I am, at the moment, merely a Ruby 
enthusiast who is seriously considering the conversion to full-fledged 
Rubyist.. So, I'm doing my homework :)
I don't currently deal with problems complicated enough to warrant the 
implementation of macros. As things stand, I am just now beginning to 
grasp the implications for Procs and Lambda, and when they get used..
This is all fascinating though. I am, for instance, particularly 
enjoying the ++ thread, which now looks like it's pretty much come to a 
close.

-- 
Posted via http://www.ruby-forum.com/.