Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros.


> Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros

is there not a whole class of problems that are not trivial if you cannot control evaluation of forms / expressions? this is one of the things (non-reader) macros provide.


> if you cannot control evaluation of forms / expressions

Assuming quote works, you can do:

  (eval (macro-expand '(
  # rest of file goes here
  )))
which I think technically meets the standards for "trivial", albeit annoying.

(Edit: Although it'd have to be eval-with-macro-expand if you want proper first-class macros.)


“Trivial” is the wrong word, but it’s fairly known/common to write an embedded interpreter. The line between interpreting and just plain programming is very blurry in a lisp.


You can still somewhat control evaluation with quote and/or list.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: