I've pointed out that the answer for things like "what should a loop that never runs its body" have varied.
rebol2/r3-alpha>> type? while [false] ["whatever"]
== none!
red>> type? while [false] ["whatever"]
== unset!
But it's consistent historically that if something runs do [] then you get an "UNSET!"
rebol2/r3-alpha/red>> type? do []
== unset!
New Names Available
One of the benefits of labeled voids is to stop collapsing all "potentially error-triggering situations" into the same uninformative name.
>> do []
== ~empty~
Or maybe that's considered to be where the "plain" form of void comes from:
>> do []
== ~void~
In either case, you've still got a type that will be "ornery" and neither true nor false, that errors if you try to access it. But by not reporting ~unset~
you're helping to convey that this wasn't the by-product of encountering an unset variable somewhere. It might help people get their bearings more easily.
I've mentioned that this is a bit unfortunate in the sense of canonizing English into the evaluator mechanics. But I'm taking away the option by removing ~
as a form of void...which is what this case had been before.
Or Is This A Job For NULL ?
We have some cases where emptiness produces NULL. With DELIMIT and its specializations, an all empty block produces the same thing that an all-NULL-producing block produces:
>> unspaced [if false ["a"] if false ["b"]]
; null
>> unspaced []
; null
>> unspaced compose [(if false ["a"]) (if false ["b"])]
; null
There's some neat combining of this with PRINT. Although PRINT draws your attention to calling with NULL via error, a BLANK! will get it to overlook that and just be a no-op:
>> print unspaced compose [(if false ["a"]) (if false ["b"])]
** error, print doesn't take NULL
>> print try unspaced compose [(if false ["a"]) (if false ["b"])]
; null
Can anyone think of a case where there's a balance of provable value for something like a do compose [...]
whose contents have all boiled away to be NULL instead of ~void~ ?
You could get the same result by saying do compose [null (...whatever...)] so it's not far out of reach to have a default value of anything you like.