pika-dev
[Top][All Lists]
Advanced

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

Re: [Pika-dev] Keyword implementation


From: Matthew Dempsky
Subject: Re: [Pika-dev] Keyword implementation
Date: 06 Jun 2004 13:35:47 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Andreas Rottmann <address@hidden> writes:

> OTOH, this would make keywords
> more heavyweight and EQ? will not work for them, so this is probably
> not a good idea. Thoughts?

Just a thought, we could add a boolean to the symbol object data for
whether it's a symbol or keyword.  To use this idea efficiently,
however, we'd probably need to change the hash table lookup for
symbols to store both a symbol and keyword for each string.

However, then SYMBOL->KEYWORD and KEYWORD->SYMBOL would either need
another lookup in the table, or we can add another element to the
vtable -- an scm object "other" that either points to null or the
result of SYMBOL->KEYWORD or KEYWORD->SYMBOL (as appropriate), though
the first time we call it we would still need to make a hash table
lookup.

Food for thought,
-jivera




reply via email to

[Prev in Thread] Current Thread [Next in Thread]