Not everyone has historically been a fan of the idea that UNLESS is a synonym for IF-NOT. It's the same number of characters, and it's been a source of controversy. When people go around changing if-not to unless, some people change it back because they think it made matters less clear.
I'd come up with what I thought was a more interesting usage of UNLESS, as an infix operator. It would evaluate both the left and the right. If the right evaluated to NULL then it would use the value of the left, otherwise the value of the right would override.
>> 0 unless null
== 0
>> 0 unless <a thing>
== <a thing>
I envisioned it being a way of reordering the order you'd read code, where you could put a default first...perhaps wanting it first to emphasize the most common case:
error-id: 0 unless case [
not block? foo [13]
closed? connection [29]
...
] ; don't need an ELSE here, the 0 is up-front
But using it as a defaulting mechanism has the problem that the left-hand side is not in a BLOCK!, so you are always running the default case's code. Trying to fix this by requiring the left side to be a block would look ugly, and seem a bit of a nasty "surprise":
thing: [ ; looks like a block literal
foo baz bar
...
x + 100
] unless switch z [ ; oh wait, that was *code*? :-/
...
]
So you'd definitely need to use GROUP!s on the left.
thing: (
foo baz bar
...
x + 100
) unless switch z [
...
]
But the value proposition gets a little bit lost once you're writing too much stuff that it pushes the UNLESS out of sight. You're better off with:
thing: switch z [
...
] else [
foo baz bar
...
x + 100
]
Not picking a definition yet might be the best idea?
Since I just came up with this alternate idea, I can't tell you how many uses I'd find for it. I'll have to try looking around consciously looking for use cases. Maybe it doesn't come up often enough, and people will miss the old UNLESS enough to be worth bringing it back.
I'll commit the new idea, and we can try it for a while. But the work has already been done to excise UNLESS, and to safely detect old usages and give warnings. There's a native IF-NOT synonym, and it's easy enough for people who want the old definition to say unless: if-not/ if they like.