Please sign in to comment.
Add "DID" native, remove ! as built-in synonym for NOT
TRUTHY? and FALSEY? operators were added to see if anyone liked them, but they were unpleasant. This removes them, assuming you would use NOT anytime you would want FALSEY?. Yet there is no general consensus on what the "opposite of NOT is", since usually the opposite of NOT is just taking it away. TO-LOGIC is a substitute, but it feels a bit drawn-out and long. A suggestion came up that at least sometimes seems okay. DID. logic-variable: did find [a b c] 'd flag1: did all [...] flag2: did any [...] While it is somewhat strange to say `did 1` -> true, if one didn't have the background to understand it then `not 1` -> false might also look quite strange. So in the interest of perhaps being a trendsetter, this goes ahead and gives it a try...it's not hard to beat TRUTHY?. logic-variable: truthy? find [a b c] 'd flag1: truthy? all [...] flag2: truthy? any [...] Additionally this removes the built-in choice to make ! a synonym for NOT, as that is not something to be encouraged in Rebol code.
- Loading branch information...
Showing with 39 additions and 13 deletions.