CMU Artificial Intelligence Repository
Home INFO Search FAQs Repository Root

ENUMS: C-style ENUMs for Lisp

lang/lisp/code/ext/enum/
In C, enums allow a compiler to optimize a switch statement by using the enums as array indices. One can achieve the same effect in Lisp case statements, if the keys are consecutive numbers. To avoid losing readability, one must use constants with #. to evaluate them at execution time.
CD-ROM: Prime Time Freeware for AI, Issue 1-1 Author(s): Joshua M. Yelon, Keywords: Authors!Yelon, ENUMs for Lisp, Lisp!Extensions References: ?
Last Web update on Mon Feb 13 10:29:29 1995
AI.Repository@cs.cmu.edu