Historically in Rebol, the #[none]
value would FORM and MOLD to appear as the WORD! none. This is still the case today in Red:
>> form #[none]
== "none"
>> mold #[none]
== "none"
One way of looking at this would be that as a none is a value a variable might wish to hold, that being able to show that is helpful for reflecting the state of a variable:
>> x: none
>> print ["The value of x is" x]
The value of x is none
But many practical cases would be improved if it just disappeared, such as these:
>> print ["thing to include" if false ["thing to omit"]]
thing to include none
>> parentheses: false
>> rejoin [
if parentheses ["("]
"thing to maybe parenthesize"
if parentheses [")"]
]
== "nonething to maybe parenthesizenone"
To say that finding a deep philosophy of PRINT has been difficult would be an understatement. Should it space or not...should the "#[none]" value be represented with an underscore for "blank", and print ["Then use that for spacing" _ x]
. :-/ Several questions remain unresolved even now.
Yet ultimately the decision was to create two routines, SPACED and UNSPACED, which treat voids as the absence of anything to stringify. PRINT invokes SPACED by default if given a block, and if one wishes to get an unspaced print you simply say print unspaced [...]
.
The result has been a profound improvement. Says @ShixinZeng:
I love it. It's much easier to write than either true ["something"][""]
You too will love it. It's much better than REJOIN. You're going to use it again and again.
Feel free to add your testimonials here.