# Metaprogramming, Lisp, Symbols, and Macros

**URL:** <https://www.ruby-forum.com/t/metaprogramming-lisp-symbols-and-macros/61324>\
**Category:** Ruby\
**Created:** [May 23, 2006, 6:42am UTC](https://www.ruby-forum.com/t/metaprogramming-lisp-symbols-and-macros/61324 "2006-05-23T06:42:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dido\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Dido\_S](https://www.ruby-forum.com/u/Dido_S)\
**Post date:** [May 23, 2006, 6:42am UTC](https://www.ruby-forum.com/t/metaprogramming-lisp-symbols-and-macros/61324/1 "2006-05-23T06:42:22Z")

</div>

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?

[1]

> **[O'Reilly Media - Technology and Business Training](https://www.oreilly.com)**
>
> Gain technology and business knowledge and hone your skills with learning resources created and curated by O'Reilly's experts: live online training, video, books, our platform has content from 200+ of the world's best publishers.

---

<div class="post-metadata">

**Author:** ![Dido\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Dido\_S](https://www.ruby-forum.com/u/Dido_S)\
**Post date:** [May 23, 2006, 6:45am UTC](https://www.ruby-forum.com/t/metaprogramming-lisp-symbols-and-macros/61324/2 "2006-05-23T06:45:32Z")

</div>

Hi!

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.

Regards  
Ola B.

----- Original Message -----  
From: Dido S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Tuesday, May 23, 2006 6:40 am  
Subject: Metaprogramming, Lisp, Symbols, and Macros  
To: removed\_email\_address@domain.invalid (ruby-talk ML)

> they were S-expressions?
> 
> [1]

> **[O'Reilly Media - Technology and Business Training](https://www.oreilly.com)**
>
> Gain technology and business knowledge and hone your skills with learning resources created and curated by O'Reilly's experts: live online training, video, books, our platform has content from 200+ of the world's best publishers.
