ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: LISP macros vs Ruby procs ?
by Lith other posts by this author
Nov 7 2009 12:48PM messages near this date
Re: LISP macros vs Ruby procs ? | Re: LISP macros vs Ruby procs ?
>  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.

It could also be interesting to compare lisp macros with template
haskell, camlp5 and similar approaches that, if I'm not mistaken, seem
to solve similar problems.
Thread:
Aldric Giacomoni
David Masover
Ryan Davis
Lith
Rick DeNatale
Lith
Aldric Giacomoni
Marnen Laibow-Koser

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved