From: "Alexandru E. Ungur" Date: 2006-06-04T02:52:13+09:00 Subject: Re: Can you do Lisp-like macros in Ruby? >>> sender: "Pat Maddox" date: "Sat, Jun 03, 2006 at 09:52:20PM +0900" << I've never used lisp before until ~2am last night...and while working > on the very simple unit testing framework in Practical Common Lisp [1] > I came up with this macro: > > (defun report-result (result form) > (format t "~:[FAIL~;pass~] ... ~a~%" result form)) > > (defmacro test (test-form) > (let ((result (gensym))) > `(let ((,result ,test-form)) > (report-result ,result ',test-form) > ,result))) > [..] Just in case you missed this great article, here it is: http://www.artima.com/rubycs/articles/patterns_sexp_dsls3.html and among other things it talks exactly about this: S-Expressions. Hope it helps, Alex