I tried thinking about writing without mac (with plain def) the first macro example from the tutorial: (def when (test . body) (eval `(if ,test (do ,@body)))) (just a matter of adding an 'eval') which at first glance it looks to work as a macro, provided that you care to quote (and if necessary un-quote) some arguments at calling time: (when 1 (pr "hello ") 2) 'mac' version
(when 1 '(pr "hello ") 2) 'def' version and for the second macro example, (let x "blub " (repeat 3 (pr x))) 'mac' version
(let x "blub " (repeat 3 `(pr ,x))) 'def' version Is this 'def'+'eval' macro way fully equivalent to the analogous 'mac' definition?
(I'm a one hour Arc newbie, so please forgive the possible trivial question) Best regards Mario |