Keyword implementation
Andreas Rottmann <[email protected]> Sun, 06 Jun 2004 14:06:10 +0200
| Newsgroups | gmane.lisp.scheme.pika.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi!
I just sat down to do a bit of work on keywords. I've now implemented
lexer support for R5RS-compatible keywords, and am now thinking about
how to best implement the data structure for them. Would a one-slot
vtable object, whose slot carries the symbol corresponding to the
keyword work? This way we can easily reuse parts of the symbols
implementation (e.g. interning), plus KEYWORD->SYMBOL and
SYMBOL->KEYWORD will be quite fast. OTOH, this would make keywords
more heavyweight and EQ? will not work for them, so this is probably
not a good idea. Thoughts?
Thanks,
Andy
--
Andreas Rottmann | [email protected] | [email protected] | [email protected]
http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
Make free software, not war!