Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to NIHIL as results for PRINT, HELP, etc.
When a function doesn't have an "interesting" result, there are tradeoffs for the choices of what to return. * VOID has the positive property of making no console output, but the negative property of being too widely tolerated as an "interesting" way of opting out of a parameter. * Things like NULL and NONE are good for their "disruptive" nature, but have the downside of making confusing-looking console output which mixes in with the intended output. It's a bit ugly, and will make beginners scratch their head when using functions like PRINT or HELP. * NIHIL is the means of vaporizing completely--used by functions like COMMENT and ELIDE. It is slightly unfriendly in the sense it cannot be used in assignments or passed as an argument to nearly all functions (excluding things like RETURN), but may lead to behavior that might seem mysterious by preserving the last result in an evaluation chain. I'd been reticent to make too many invisible functions in the core, preferring that people write ELIDE PRINT if they really wanted to erase the return value from PRINT. But as it became clear that VOID was truly the best choice for making no console output, and no console output would be output from something like `do [comment "hi"]`, the fact that the evaluator would be based on DO meant that usage of an expression that was solely an invisible would wind up appearing VOID while having some ornery properties. From a marketing perspective, the choice of NIHIL as the return result from functions like PRINT and HELP simply could not be avoided. This buries the hatchet and makes that choice.
- Loading branch information