Hacker News new | ask | show | jobs
by kennytilton 2952 days ago
Was McCarthy even thinking of macros when he locked onto code as data? Or was he thinking code generation in pursuit of AI?Asking, do not know. I know macros are a great example of code=data, but I once had a ball using the AllegroStore CLOS database and a homebrewed DB synch layer to handle remote distribution and update of forms and the code to validate them in a clinical drug trial management context, where forms and their validation code are forever changing. Basically, an intractable software maintenance problem just disappeared. That's always fun. http://smuglispweeny.blogspot.com/2008/03/my-biggest-lisp-pr...
1 comments

He was not, macro libraries like defmacro and define-syntax were later addition to lisp. Well before formal macro systems were implemented, code-as-data was particularly useful for implementing the eval function in Lisp (the Lisp 1.5 implementation takes up less than a page), which greatly simplified the process of implementing compilers and interpreters.