Replies: 4 comments
-
Reading into the old issues is pretty interesting. To me it is surprising that |
Beta Was this translation helpful? Give feedback.
-
This is better: unset? all [] ;== true
unset? all [()] ;== true |
Beta Was this translation helpful? Give feedback.
-
So now it is: all [
print "Testing ANY"
none? any []
none? any [()]
1 = any [() 1]
print "Testing ALL"
1 = all [1 ()]
unset? all []
unset? all [()]
print "Tests OK"
] ;== true |
Beta Was this translation helpful? Give feedback.
-
For whatever it is worth 🤷 I have decided that my analogue to "unset!" should be truthy. So Ren-C's handling in ANY and ALL matches Red's... where they, uh, sort of treat it as true:
I provide my rationale for why truthiness is the right answer here (note I call the unset state "nothing", because I believe variables are unset not values. e.g. UNSET? 'VAR.) https://forum.rebol.info/t/the-truthiness-of-nothing/2180 Also I give some rationale for why I think Rebol2 was correct to not allow UNSET! in comparison operators. (I'll mention that in Ren-C, () does not produce NOTHING...but rather, a VOID. So your particular example above would have the opt out behavior you show.) It would be some kind of freakish miracle if all of us could agree to make it truthy, allowed to assign a SET-WORD! without error, and not accepted by comparison operators. 😛 |
Beta Was this translation helpful? Give feedback.
-
Should I make this change?
Current version (compatible with Red (almost) and Rebol2):
after change:
In original R3 alpha it was:
Related discussion: http://www.rebol.net/cgi-bin/r3blog.r?view=0207
Related issues:
Oldes/Rebol-issues#564
Oldes/Rebol-issues#850
Oldes/Rebol-issues#2248
And also:
red/REP#85
red/red#4469
red/red#4482
Beta Was this translation helpful? Give feedback.
All reactions