When printing, values like undefined, null, NaN, etc. are often elided or replaced—e.g., the naked variable markup simply reprints the variable name when encountering such values. This was done in an attempt at user friendliness, however, in hindsight it causes a not insignificant amount of confusion.
It would be better if such values either caused some kind of error—either a standard SugarCube error or something like the variable name and the value $someVar(undefined)—or simply printed a string representation of the value.
When printing, values like
undefined
,null
,NaN
, etc. are often elided or replaced—e.g., the naked variable markup simply reprints the variable name when encountering such values. This was done in an attempt at user friendliness, however, in hindsight it causes a not insignificant amount of confusion.It would be better if such values either caused some kind of error—either a standard SugarCube error or something like the variable name and the value
$someVar(undefined)
—or simply printed a string representation of the value.