The error is caused by the fact that eval sees the var as a constant (or part of) and tries to serialize the constant. #<Var: --unnamed--> is unreadable while #'user/x is that explains teh difference in behaviour.
On Thu, Aug 8, 2013 at 3:40 PM, Jamie Brandon <ja...@scattered-thoughts.net>wrote: > This has me stumped: > > user=> (with-local-vars [x nil] (eval x)) > #<Var: --unnamed--> > user=> (with-local-vars [x nil] (eval [x])) > CompilerException java.lang.NullPointerException, > compiling:(NO_SOURCE_PATH:1:1) > > By comparison: > > user=> (def x nil) > #'user/x > user=> (eval #'x) > #'user/x > user=> (eval [#'x]) > [#'user/x] > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- On Clojure http://clj-me.cgrand.net/ Clojure Programming http://clojurebook.com Training, Consulting & Contracting http://lambdanext.eu/ -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.