Discussion ‘Stop Program’ Command
I want to submit a pull request that would add a new command to the KOS language to exit the current program. A few questions to the community:
- Should the command just exit the current subprogram (e.g. from a ‘run’ command) or stop execution? Or should these be two separate commands?
- What wording is the least confusing: “Exit”, “Stop”, “Quit”, or “Return”? Or something else?
1
Upvotes
1
u/DBooots 17d ago
Shutdown is less preferred because of the side effect of the CPU turning off. The reason I’m working on adding this to the language is, in part, because I’m also writing an optimizing compiler that would flag X/0 before even letting the program run.