Concatenating atoms

Thomas Lindgren thomasl_erlang@REDACTED
Wed Feb 2 11:30:26 CET 2005


--- "Richard A. O'Keefe" <ok@REDACTED> wrote:

> Thomas Lindgren <thomasl_erlang@REDACTED> wrote:
> 	It _would_ be useful to have some way to check
> whether
> 	an atom with a given name already exists. Compiler
> 	writers and other "gensym users" would appreciate
> it
> 	(at least some -- me -- would). 
> 
> I don't see how this would be useful.

Well, in my sequential compiler code it still would,
though a straightforward gensym might be what I really
need (to avoid the concurrency issue that you
subsequently describe). 

Your point about using ref:s for uniqueness is well
taken, but they are not nearly as convenient for what
I'm doing (which is hooking into the existing Erlang
compiler). At present, I instead rely on being "nearly
sure" that the atom name is unique, which is somewhat
unsatisfactory: the equivalent of "security by
obscurity". 

(I vaguely seem to recall that ref:s are, or at least
were, not entirely guaranteed to be unique either, but
that might be an implementation detail.)

Detecting changes to the atom table seems at the face
of it no worse than detecting changes to an ets table,
though I'm willing to be convinced otherwise.

Best,
Thomas



		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 



More information about the erlang-questions mailing list