Re: Bug report -- macros within let [Re: Bizarre behavior (bug?) for unchecked-add]

2009-06-09 Thread Laurent PETIT
Thinking about it again, Is qualifying this as a non-bug, a known limitation the best that can be said about it ? Could the implementation be improved to handle this case, or is there a theoretical reason I've not thought about that prevents doing this for the general case ? Thanks, -- Lauren

Re: Bug report -- macros within let [Re: Bizarre behavior (bug?) for unchecked-add]

2009-04-24 Thread Christophe Grand
Hi Kevin! Your (let [dummy 0] ...) is a single expression and, as such, is entirely compiled before being executed. But to properly compile (add 1 (mul magic x)) 'add need to have a value and it will not have a value until the (compiled) expression is executed. So, for this expression, its comp

Bug report -- macros within let [Re: Bizarre behavior (bug?) for unchecked-add]

2009-04-23 Thread ke...@ksvanhorn.com
I have more information on this now, and it is definitely a bug in Clojure -- defmacro within a let doesn't work correctly. Consider the following file: --- BEGIN foo1a.coj --- (ns com.ksvanhorn.foo1a) (let [dummy 0] (defmacro add [& args] `(unchecked-add ~...@args)) (defmacro mul [& args]