Re: Gensym collisions can be engineered.

2013-08-17 Thread J.-F. Rompre
Interesting discussion - I was pretty surprised to see this can happen I don't understand all the details about the solutions discussed in this thread, but it seems that the only way to ensure no local can be clobbered, gensym'ed or not, is to introduce into the RT a "local resolution phase"

Re: Gensym collisions can be engineered.

2009-11-12 Thread Kevin Tucker
Personally I think preventing unexpected gensym collisions is the more important property, otherwise it's not even worth having, might as well just make your own cryptic names. I don't think you can have both. -- You received this message because you are subscribed to the Google Groups "Clojure

Re: Gensym collisions can be engineered.

2009-11-11 Thread John Harrop
On Wed, Nov 11, 2009 at 10:46 PM, Kevin Tucker wrote: > Yeah, sorry, missed that. > > How does making the gensyms unreadable make things worse for > macroexpand than they are in CL? It doesn't. Just worse than they currently are in Clojure. :) -- You received this message because you are subsc

Re: Gensym collisions can be engineered.

2009-11-11 Thread Kevin Tucker
Yeah, sorry, missed that. How does making the gensyms unreadable make things worse for macroexpand than they are in CL? If the gensym is used more than once in the expansion (like bound to something in a let then referenced), then reading the expansion back in will read two different symbols and

Re: Gensym collisions can be engineered.

2009-11-10 Thread John Harrop
On Mon, Nov 9, 2009 at 10:04 PM, Kevin Tucker wrote: > I in CL they can be read but aren't interned in any package so every > time you read it you get a different symbol. Yes, I know; I said that myself in the first post. But your first post inspired in me the idea of simply making symbols that

Re: Gensym collisions can be engineered.

2009-11-09 Thread Kevin Tucker
I in CL they can be read but aren't interned in any package so every time you read it you get a different symbol. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: Gensym collisions can be engineered.

2009-11-09 Thread John Harrop
On Sun, Nov 8, 2009 at 5:56 PM, Kevin Tucker wrote: > This is something that I have been wondering about too. In CL the > symbols gensym produces can not be read by the reader so there can be > no collision cause the only way to get a handle on the symbol is to > create it with gensym and hold o

Re: Gensym collisions can be engineered.

2009-11-09 Thread Kevin Tucker
This is something that I have been wondering about too. In CL the symbols gensym produces can not be read by the reader so there can be no collision cause the only way to get a handle on the symbol is to create it with gensym and hold on to it. In other words you couldn't construct a symbol that

Re: Gensym collisions can be engineered.

2009-11-08 Thread André Ferreira
It's one thing to try to protect the programmer from accidentally shooting himself on the foot, but I don't think it is as necessary for a language to prevent him from doing it on purpose. On 8 nov, 02:59, John Harrop wrote: > user=> (def q 'G__723) > #'user/q > user=> (def r (gensym)) > #'user/

Gensym collisions can be engineered.

2009-11-07 Thread John Harrop
user=> (def q 'G__723) #'user/q user=> (def r (gensym)) #'user/r user=> q G__723 user=> r G__723 user=> (= q r) true It's possible to anticipate the next gensym name that will be generated and then engineer a collision, and therefore possibly variable capture unintended by the author of a macro.