forked from rebolsource/r3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kill IS_CONDITIONAL_TRUE()/IS_CONDITIONAL_FALSE()
There was a speculative feature implemented which would cause errors when conditionals were used with literal blocks, to stop the relatively common newbie mistake: if [var = value] [print "var equals value"] A distinct test than the system test for "falsey-ness" was added which was a test for "conditional falsehood" which didn't accept literal blocks. The supporting infrastructure to be able to offer such an error is the VALUE_FLAG_UNEVALUATED, which is interesting and has a lot of cool applications. But applying it in the core to this feature was deemed to be a relatively small benefit, and it also breaks several cases where literals in conditional slots might be useful, such as: compose/only [... if (condition) [...] ...] There may still be applications and means to check this common mistake, but along with several other "safety measures" this is probably not a fit for the core primitives.
- Loading branch information
1 parent
1fefdbf
commit 2ca0bdc
Showing
3 changed files
with
4 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters