Alan Malloy <[email protected]> writes:

> Certainly it does work the same way in JVM-Clojure:
>
> user=> (gensym)
> G__1278
> user=> (gensym)
> G__1281
> user=> (gensym)
> G__1284
> user=> (= 'G__1287 (gensym))
> true
>
> Whether that's a bug or a case of "If it breaks when you do that, then
> don't do it" isn't for me to say, but I would be pretty surprised to
> hear that Rich doesn't already know about this behavior.

It has been discussed 3 years ago already:

  
https://groups.google.com/forum/?fromgroups=#!searchin/clojure/gensym/clojure/-054P1u5M7o/EYomzAkNZiYJ

IMHO, it's clearly a bug, but since the workaround of simply not naming
your own symbols "G, two underscores, number" or "something, two
underscores, number, two underscores, auto, two underscores"
(auto-gensyms) is so cheap, it's not a very high priority.

Oh well, (gensym "a") => a7795 really has a potential of clashing.  I've
heard that at least programming physicists like having lots of variables
and simply number them consecutively. :-)

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to