On 1 Sep 2010, at 08:25, Konrad Hinsen wrote:
Right, but then this should be blamed on macroexpand-all, which
implements a crude approximation to how macroexpansion is done by
the compiler.
There's also clojure.contrib.macro-utils/mexpand-all, which does a
much better job, but still fails
On 1 Sep 2010, at 00:17, Frederic Koehler wrote:
If you were to say, (macroexpand '(foo)), it returns (foo), even if
it's
not defined in the context, so I'd say it's a little unexpected.
True, but then, the function macroexpand is mostly a development tool,
for which I can accept such mino
I agree, that's not the expected behavior. The form is just data, it
doesn't have to be valid code. Since '(Object) is not a macro (Object
is a Symbol there, not a class) it should just return the form just
like (identity) does:
user=> (identity '(Object))
(Object)
But macroexpand-1 does some extr
If you were to say, (macroexpand '(foo)), it returns (foo), even if it's
not defined in the context, so I'd say it's a little unexpected.
More annoying is the result this has on macroexpand-all, which breaks
because of this weird behaviour:
(use 'clojure.walk)
(walk/macroexpand-all '(let [Object
On 30 Aug 2010, at 23:18, Frederic Koehler wrote:
I accidentally noticed this:
On clojure 1.2, macroexpanding with a function name which is a class,
causes this ugly error:
(macroexpand '(Object))
java.lang.Exception: Expecting var, but Object is mapped to class
java.lang.Object (repl-1:2)
I accidentally noticed this:
On clojure 1.2, macroexpanding with a function name which is a class,
causes this ugly error:
> (macroexpand '(Object))
java.lang.Exception: Expecting var, but Object is mapped to class
java.lang.Object (repl-1:2)
when presumably it should just give '(Object).
I hav