(Related question: What should do of empty string (`DO ""`) do?)
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 []
(what Ren-C calls EVAL when it's a BLOCK! you're evaluating) then you get an "UNSET!"
rebol2/r3-alpha/red>> type? do []
== unset!
New Isotopic States Available
Ren-C has a choice most corresponding to UNSET!, which is NOTHING. Nothing does not display in the console, which might be considered an advantage.
>> eval [] ; imagine this returns NOTHING
But if you evaluate to nothing during something like REDUCE, it would give you an error.
>> reduce [1 + 2 ~ 3 + 4]
** Script Error: Invalid use of ~ antiform
To get opt-out behavior, it would have to give VOID or NIHIL.
>> eval []
== ~void~ ; anti
VOID would then be the same thing you get from a failed conditional.
>> if false ["a"]
== ~void~ ; anti
As well as the established result of an ANY or ALL in which all the expressions opt out.
>> all [if false ["hello"] comment "world"]
== ~void~ ; anti
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 NOTHING instead of VOID or NIHIL?