Are there any advantages to having assert be a statement (and reserved word) instead of a function?
- Cannot be reassigned to a user function, meaning it can be effectively disabled at compile time as @mgilson pointed out.
- The evaluation of the second, optional parameter is deferred until if/when the assertion fails. Awkward to do that with functions and function arguments (would need to pass a lambda.) Not deferring the evaluation of the second parameter would introduce additional overhead.