Forum: Ruby Metaprogramming, Lisp, Symbols, and Macros

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2d3ec3a83b4f8784d6853564fa0d2e77?d=identicon&s=25 Dido Sevilla (Guest)
on 2006-05-23 06:42
(Received via mailing list)
I've been reading some articles on why Ruby has symbols and all that,
and one of the most interesting articles on this subject I've read
opines that Ruby has them because they are preparation for a future
metaprogramming environment as powerful as Lisp's [1]. I've been
experimenting with Lisp and Lisp-like languages for a while, and have
seen how a first-class macro facility similar to that of Common Lisp
can be incredibly useful, and am wondering if thought is being given
to providing a similar macro facility to Ruby. I am curious as to what
form such a system would take; would we have a syntax tree
manipulation API that allows one to manipulate Ruby programs as though
they were S-expressions?

7359ed44852399295c6247dd9719b81b?d=identicon&s=25 Ola Bini (Guest)
on 2006-05-23 06:45
(Received via mailing list)

If I may be so bold... I love Lisp in many ways, and Common Lisp macros
are incredibly powerful. Ruby can't match that yet... but boy are we
close. Actually, most of the metaprogramming is already there. Some of
the support (the MOP for example) is way better and more intricate than
CLOS. If you need to be convinced, take a look at the Rails source code.
You could probably not compress it much more even with Lisp.

 Ola Bini

----- Original Message -----
From: Dido Sevilla <>
Date: Tuesday, May 23, 2006 6:40 am
Subject: Metaprogramming, Lisp, Symbols, and Macros
To: (ruby-talk ML)

> they were S-expressions?
> [1]
This topic is locked and can not be replied to.