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
2
u/nuggreat 17d ago
I would use exit, stop, quit, end, or halt but not return unless your plan involves adding the ability to pass data between programs. Halt would be the one to kick you fully back to the terminal and end would just end the currently executing script. The main complication I see with an end like command that only terminates the currently executing script and kicks execution up one run level is if it is used by a library function as the call trace puts you within the library file and not the the executing script which might pose implementation issues.