aether
aether copied to clipboard
Compile-time checking for valid command names
Currently, we use CLOS's ability to dispatch on keyword EQL
ity to link items in a PROCESS
's command stack with their executable definitions. This is deficient for compile-time checking: CLOS can't tell whether a specialization will be defined later, and so refuses to emit a warning if a programming misenters the name of a command.
This might come down to processing command definitions more than once: first to gather all the command keywords, then to check that there are no unknown command references. This would probably be eased by requiring that all the commands which make up a procedure are defined in a single define-procedure
block, which could do this kind of local lookahead.
See also #6 .
Original issue
PlanetLisp recently advertised this a clever ecase
variant which contains a compile-time check that the list of match clauses itself exhausts some enumerative type. This could be a useful tool for how PROCESS
commands are currently defined and dispatched. (It's less clear to me that it would be useful in the farther future envisioned in the DSL project.)