UPDATE 2025: This post was originally written before the NULL/VOID split. With only one "not-a-reified-thing" (e.g. only one "antiform") then things like APPEND had to choose whether appending them would be an error, or a no-op.
At the moment in 2019, it was a no-op:
>> append [x y z] select [a 10 b 20] 'c == [x y z]Of course things have changed a lot now, but it still might be the case that you want to ensure something is non-NULL. I've rewritten it using a modern-relevant example using SWITCH for clarity.
We live in a world now where most places don't tolerate NULL, e.g. you can't APPEND it to arrays.
But sometimes you might want to ensure an expression does not produce null...
>> branches: ['x [print "hi"] 'y [print "bye"]]
>> switch 'x branches
hi
>> switch 'y branches
== \~null~\ ; antiform
>> *SOME-NAME* switch 'y branches
** PANIC: *SOME-NAME* received NULL
Solve for SOME-NAME. ![]()
Once upon a time, this was called ENSURE:
>> ensure select [a 10 b 20] 'c
** Error: e.g. "Couldn't ENSURE you had a value, it was NULL""
** Near: ensure ** select [a 10 ... (blah blah
But that was retaken to be a 2-argument function: a variant of MATCH that triggers an error if the type doesn't match a type or set (e.g. ensure [text! integer!] 1 + 2). It passes the value through if it matches, and raises an error if it does not.
I used that all the time, whereas a single-arity function that checked against NULL seemed less useful.
Still...for the heck of it, I went ahead and made a non-null checker and called it... REALLY. Yes, REALLY.
>> really select [a 10 b 20] 'c
** Error: e.g. "You REALLY wanted a value, but got back NULL"
** Near: really ** select [a 10 ... (blah blah
I didn't like the name, and never used it. Nulls caused enough problems in those days on their own.
Anyway, REALLY isn't going to get used for anything else (at least no time soon) so it's not like it's hurting anything.
The floor is open for thoughts. Short words preferred.