Email list hosting service & mailing list manager

A different approach Thomas Lord (18 Jul 2005 17:45 UTC)
Re: A different approach felix winkelmann (19 Jul 2005 08:19 UTC)
Re: A different approach Jens Axel Søgaard (19 Jul 2005 08:29 UTC)
Re: A different approach felix winkelmann (19 Jul 2005 08:39 UTC)
Re: A different approach Jens Axel Søgaard (19 Jul 2005 08:46 UTC)
Re: A different approach felix winkelmann (20 Jul 2005 07:25 UTC)
Re: A different approach Jens Axel Søgaard (20 Jul 2005 10:07 UTC)

Re: A different approach Jens Axel Søgaard 20 Jul 2005 10:07 UTC

felix winkelmann wrote:
> On 7/19/05, Jens Axel Søgaard <xxxxxx@soegaard.net> wrote:

>>Since some implementation do have uninterned symbols, it implies
>>that it isn't great style to rely on the above.
>
> Well, I'm usually very careful with broad "isn't great style"
> generalisations. Uninterned
> symbols do in fact complicate the (IMHO rather handy) assumption that
> symbol->string and string->symbol 1:1 relationship. Gensyms are an
> implementation
> hack (used in 99% of all cases for "defmacro"-style macro programming). In fact,
> I'd rather see a "(genguid)" than a "(gensym)" :-).

Well, I didn't say it was bad style - just that it isn't great style ;-)

> The problem is that I've seen numerous bodies of code (object-systems,
> macro-expanders,
> module systems, ...) that depend on some kind of "symbol-append" function and
> convert back and forth between symbols and strings. In these cases a
> 1:1 relationship
> is required as uninterned symbols may lead to unexpected things.

To me uninterned symbols isn't as much an "implementation hack" as a
solution to a problem with the "symbol-append" approach.

If you want to generate a unique symbol it is unsafe to rely on
the symbol-append approach. It is possible to lower the probability
of clashes by using strange names, but one can't really be sure.

--
Jens Axel Søgaard