Thank you very much for this detailed explanation!
Michiel de Mare
On Dec 3, 2:47 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Dec 3, 6:58 am, Michiel de Mare <[EMAIL PROTECTED]> wrote:
>
>
>
> > Indeed, (print-dup (new StringBuffer) (new java.io.StringWriter))
> > throws the same exception.
On Dec 3, 6:58 am, Michiel de Mare <[EMAIL PROTECTED]> wrote:
> Indeed, (print-dup (new StringBuffer) (new java.io.StringWriter))
> throws the same exception.
> But (new StringBuffer) in the REPL prints the stringbuffer just fine.
>
> Why does the exception only get triggered in macros?
>
> And do
Indeed, (print-dup (new StringBuffer) (new java.io.StringWriter))
throws the same exception.
But (new StringBuffer) in the REPL prints the stringbuffer just fine.
Why does the exception only get triggered in macros?
And doesn't print-dup need a default for unknown classes?
On Dec 3, 12:23 pm, M
Hi,
On 3 Dez., 12:04, Michiel de Mare <[EMAIL PROTECTED]> wrote:
> This has nothing to do with eval. The following fails too:
>
> (defmacro foo [] (new StringBuffer))
> (foo)
The results at the Repl are printed via pr-on and
obviously print-dup doesn't know how to print a
StringBuffer.
Sincerel
This has nothing to do with eval. The following fails too:
(defmacro foo [] (new StringBuffer))
(foo)
On Dec 3, 3:22 am, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> Hi Michiel,
>
> eval is for form data, so I am more surprised that it works for
> ArrayList than that it fails for StringBuffer
Hi Michiel,
eval is for form data, so I am more surprised that it works for
ArrayList than that it fails for StringBuffer.
Stu
> After playing around with macros, I ran into this problem with Clojure
> (the latest version from github). The following code throws an
> IllegalArgumentException: