Note that ~ gives you a non-vanishing void:
>> 1 + 2 ~
== \~()~\ ; antiform (pack!) "heavy void"
There are good reasons for this (which tie into the reason that ^VOID is also non-vanishing):
>> 1 + 2 ^void
== \~()~\ ; antiform (pack!) "heavy void"
But if you want a "lighter than GHOST" way of making a vanishing void, you can use an empty GROUP!:
>> ()
== \~\ ; antiform (void!)
>> 1 + 2 ()
== 3
Some people might find the empty GROUP! pattern to be a pleasing option to use for optional parameters, since it has more "heft" than a simple tilde, but isn't as heavy as a WORD!:
>> replace [a b c b e] 'b ()
== [a c e]
>> replace [a b c b e] 'b ~
== [a c e]
>> replace [a b c b e] 'b noop
== [a c e]
>> replace [a b c b e] 'b ^void
== [a c e]
I'd imagine a lot of people would pick () if those were the only options. But () won't be caught by the "NODISCARD" logic. So you might want to be careful with that.
But replace just accepts voids if that's what your expression happens to synthesize. If you're passing something directly at a callsite, the best choice is probably an empty splice, e.g. a NONE
>> replace [a b c b e] 'b none
== [a c e]
This Use Of () Has Some Precedent In Historical Redbol
...though without antiforms it was always ambiguous whether you meant to put #[unset] into the lists or if you really meant "nothingness":
red>> append "abc" ()
== "abc"
red>> append [a b c] ()
== [a b c unset]
red>> replace/all [a b c b e] b ()
*** Script Error: replace/all does not allow unset! for its value argument
Your daily reminder that isotopes and meta-representational coherence aren't some intellectual waste of time. ![]()