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.
Allow SET/PAD to be used with BLANK on BLOCK! targets
R3-Alpha and Red let you write `set [a b] 10`, since the thing you were setting to was not a block, would assume you meant to set all the values to that. BUT since you can set things to blocks, this has a bad characteristic of `set [a b] [10]` being treated differently, which can bite you if you `set [a b] value` for some generic value. Ren-C does not carry forward the behavior, rather it allows only one case...to pass in a blank value with /PAD and handle that blank as if it were an empty block, return blanks. This permits things like `if set [a b] find data 'whatever [...]` to do a blank propagation. This is to facilitate the only known client of the behavior, which was the module code. !!! Should there be a SET/ONLY to allow for `set/only [a b] [10]` such that a and b would be set to 10? Adding more complexity to a primitive like SET is not very desirable, and you can do this other ways in usermode if it's what you really want.
- Loading branch information
1 parent
5337611
commit b86b5eb
Showing
3 changed files
with
43 additions
and
8 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