"Meikel Brandmeyer (kotarak)" <m...@kotka.de> writes:
> Clojure's compile unit is one toplevel form. Therefore
>
> (intern 'user 'bob3 3) 
> bob3
>
> works, while
>
> (is (do (intern 'user 'bob2 2) bob2))
>
> does not, because the former are two compilation units while the latter is 
> only one. (Note: (do ...) is a special case. (do (intern 'user 'bob3 3) 
> bob3) should actually work.)

Yep, do on it's own does work.

The problem, here, then is that a chunk of code like

    (do (intern 'user 'bob3 3) bob3)

Sometimes works, and sometimes doesn't. And whether it does or does not
depends on it's context. As I said in the last post, I'd worked out why
the immediate reason it fails. But I cannot understand from looking at
the code why

    (do (intern 'user 'bob3 3) bob3)

is two compilation units, while 

    (is (do (intern 'user 'bob3 3) bob3))
    
or 

    (try (do (intern 'user 'bob3 3) bob3))

are both one (the latter fails also).

Seems rather like a bug to me. If the compiler can identify that 

      (is (do (def bob3) bob3))

is valid, the same should be true for an intern form.

Phil

-- 
-- 
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.

Reply via email to