As I’ve said before: it’s good to try new things–and Ren-C has plenty of ideas that turned out to be winners (or led to a path of evolution to something that was a winner). but if a change doesn’t come out as a winner, it needs to be rethought and possibly backed out.
I think the use of
!! as a kind of ternary operator has turned out to be a turkey.
(Please review “Backpedaling on non-BLOCK! branches” for some of where these guys came from)
These were chosen because they “stand out” a bit more than something like C’s condition ? true-thing : false-thing; ternary operator. That is why Perl6 chose them over simply
!. Doubling that makes them stick out like a sore thumb.
But can sticking out like a sore thumb be used better?
For a time I liked it, studying the construct in isolation. If you pulled up examples they looked okay. Yet taking a step back from the page, they looked odd in context.
Hence, this property may be something you want to do with constructs that are designed to be transient, and not committed in code. This makes me think that ??'s previous purpose as a debug construct might have been superior. Then as you visually scan the code you can tell if you’ve left debugging information in–it jumps right off the page. By a similar token, !! seems like it might make a great breakpoint.
This doesn’t give an answer to what would take the place of operators that do not “double evaluate” their branches.
>> 1 < 2 foo [a] == [a] >> 1 > 2 foo [a] ;-- null >> null bar [a] == [a] >> 7 bar [a] ;-- 7
Solve for FOO and BAR. THEN and ELSE are taken for other purposes. And I’m saying ?? and !! have been tried, and don’t have the right feel.
It may turn out that Rebol doesn’t need these constructs. if condition [[a]] or condition and [[a]] don’t really look that bad. Nor does nullable else [[a]]. There’s probably a critical mass count of control constructs, and putting in too many may do more harm than good.
There’s also a kind of ugly property they have, where people might write condition ?? 1 + 2 !! 3 + 4, not realizing that both additions will run. This is true also of EITHER and IF, but people are unlikely to do calculations to make blocks that then execute (a “double-evaluate”) unless they’re at least somewhat sophisticated, and understand the way Rebol works.
All that said: if anyone can think of non-symbolic names for them, that could be interesting. I think it would be a mistake to just pick short available words that “kind of” line up (e.g. 1 < 2 so “x” but “y” looks okay yet it’s more or less gibberish.) We could go with single character operators as 1 < 2 ? “x” ! “y” which makes them blend in better with normal looking operators, but I still have my doubts on if that’s a fit for the kind of aesthetic we’d be looking for putting in the box.
I’m willing to just forget about “blockless control constructs”, for now. AND with OR, and using blocks, with a
[[double-block if you *literally* wanted a block]], is close enough.
(Note that this ability of AND when it has a BLOCK! on the right is a more modern invention, and did not exist at the time ?? was made. Just another case of time and experience allowing a better solution to emerge.)