[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Translator
Date: Thu, 13 Sep 1990 21:59 EDT
From: kddlab!atr-ln.atr.co.jp!myers@uunet.UU.NET (John K. Myers)
I'm building a rewriting system that takes a structure, looks at its
name, and calls a special rewriting function for it. The system has
to be blazingly fast. There will be about 1000 kinds of structures.
Use a CLOS generic function. If each structure is of its own type, you
can use FUTURE-COMMON-LISP:DEFSTRUCT and a CLOS generic function to do
the rewrite, specialized on the type. If the structures are all of the
same type, you can still do it, only using an EQL specializer on the
name. In either case, a hash lookup will be used, and in either case,
it's easy to intercept the undefined case, as well as to add new
handlers.
- References:
- Translator
- From: kddlab!atr-ln.atr.co.jp!myers@uunet.UU.NET (John K. Myers)