-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ALL [()] should have the same result as ALL [] #850
Comments
Submitted by: BrianH Good point, even though #[unset!] counts as true for control functions. Ticket changed to reflect the new request - just put a copy of your comment in there and tweaked the code. |
Submitted by: Ladislav I guess that it is possible to change the implementation of All so that #[unset!] is completely ignored, i.e., that all [1 ()] would yield 1, etc. |
related issues: metaeducation/rebol-issues#564 metaeducation/rebol-issues#850 It reverts changes discussed in above issues as I consider this behavior to be more useful and it is compatible with Rebol2 and Red. My main reason is to be able use PRINT inside ALL blocks without need to worry if these would affect the evaluation. Like in this case: ``` if all [ not headers any [ all [ d1: find conn/data crlfbin d2: find/tail d1 crlf2bin print "server using standard content separator of #{0D0A0D0A}" ] all [ d1: find conn/data #{0A} d2: find/tail d1 #{0A0A} print "server using malformed line separator of #{0A0A}" ] ] ][ ... ] ```
In Ren-C, GROUP! no longer synthesizes any values...it only groups them.
Hence ALL does not have the opportunity to differentiate There's no special code in ALL needed for this transparency--it just emerges from the new properties of GROUP!. |
Submitted by: Ladislav
Checked #564: "ANY and ALL are primarily used as control structures. As such, it might be good for unset! values to be skipped by both ANY and ALL, like noops." If that is what we want, then
all [()]
has to yield the same result as
all []
i.e. True, not #[unset!], etc.
CC - Data [ Version: alpha 54 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:none ]
The text was updated successfully, but these errors were encountered: