Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile-time checking for valid command names #11

Open
ecpeterson opened this issue Nov 12, 2020 · 0 comments
Open

Compile-time checking for valid command names #11

ecpeterson opened this issue Nov 12, 2020 · 0 comments

Comments

@ecpeterson
Copy link
Contributor

Currently, we use CLOS's ability to dispatch on keyword EQLity 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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant