News for hackers. Stuff that matters.
Re:Just what does “code as data” mean anyway? (2014) by kbp on Friday February 16, 2018 @11:22AM (#16393410)
> I kept reading places that lisp macros and c macros were completely distinct, which seems untrue after a couple years of trying clojure.

They're similar in that they're both compile-time functions that generate code, but they're very different in practice, because C macros are written in a text substitution language that knows virtually nothing about C, which naturally makes writing even simple macros very error-prone. Lisp macros, on the other hand, are written in plain old Lisp and receive regular Lisp data structures that you can use the whole language to operate on.

A lot of people learn from C that macros are very difficult to get right, so it's important when they move to Lisp that they give them a second look, because Lisp is a much more capable language for code transformation than cpp.

Re:Just what does “code as data” mean anyway? (2014) by yetanotheruser on Friday February 16, 2018 @01:53PM (#16394793)
Right, that makes sense