On Fri, Nov 6, 2009 at 3:05 PM, lith <minilith / gmail.com> wrote:
>> LISP's ` (the backtick) is roughly equivalent to Ruby's eval with a
>> string, right?
>
> That like saying a string is equivalent to an array/list. In lisp, a
> macro can take the arguments transform it using the usual set of list-
> related functions and generate the code for the macro. In scheme, you
> can use some sort of structured pattern matching to generate the code.

The enabling feature of Lisp which makes its macros possible is
homoiconicity, which means that the external representation of a lisp
program is exactly a  human-readable form of the internal executable
representation, plus the fact that this internal representation is a
fundamental data-type of the language.

This means that Lisp code can manipulate and generate the internal
executable program representation directly and macros are really just
Lisp procedures which do just that.

http://en.wikipedia.org/wiki/Homoiconicity
http://c2.com/cgi/wiki?DefinitionOfHomoiconic

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale