[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A different approach

This page is part of the web mail archives of SRFI 75 from before July 7th, 2015. The new archives for SRFI 75 contain all messages, not just those from before July 7th, 2015.



On 7/20/05, Jens Axel Søgaard <jensaxel@xxxxxxxxxxxx> wrote:
> 
> Well, I didn't say it was bad style - just that it isn't great style ;-)
> 

Ok.

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

If I want to generate a unique tag, I can just as well use a vector or pair.
And if I want to avoid symbol clashes GUIDs should be sufficient. The
question is
just how often we need unique symbols (when things can be done with other
methods). 

I'm just looking for problems that the above mentioned 1:1 relationship may 
introduce, and so far I've heard nothing that is really convincing, apart from
the uninterned symbols issue (which is non-standard, and a bit weak, IMHO). 
I would just appreciate if the "isn't great style" argument could be supported
with something more substantial.


cheers,
felix