At 03:42 PM 10/2/00 +0200, Paolo Molaro wrote:
>On 09/27/00 Ken Fox wrote:
> > Dave Storrs wrote:
> > > It isn't terribly clear to me either
> >
> > Well, he does give a couple references that would clear it up.
> > X11 Atoms are well documented.
> >
> > > saying is that you can qs() a method name, get a "thingie" out, store the
> > > thingine in a scalar, and then that scalar becomes a direct portal to the
> > > method...somewhat like a coderef, but without a required deref.
> >
> > Actually it's more trivial than that. When you "intern" a symbol, you're
> > adding a string-to-integer mapping to the compiler's symbol table. Whenever
> > the compiler sees the string, it replaces it with the corresponding
> > integer. (The type stays "symbol" though; I'm sort of mixing implementation
> > and semantics.) Think of it like a compile-time hash for barewords.
>
>Not only that: every time the compiler sees another symbol with the
>same string representation, it uses the already created symbol, so
>it doesn't use more memory.

Ah, I see what you're asking.

Whether this sort of thing is user-visible is a separate issue (and one for 
-language). Personally I don't think it should be--there's reasonably 
little value at the user level.

For the internals, though...

This would be very useful, and it's a feature I'd really like to implement. 
Basically you're asking for pre-computed, indirect, shared hash keys. This 
sounds like a Good Plan to me.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to