Skip to content
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

UNPROTECT/words object! #1015

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 1 comment
Closed

UNPROTECT/words object! #1015

Siskin-Bot opened this issue Feb 15, 2020 · 1 comment

Comments

@Siskin-Bot
Copy link
Collaborator

Siskin-Bot commented Feb 15, 2020

Submitted by: BrianH

I have already run into situations where you would want to prohibit adding new words to an object, even if you want to allow changes to the existing words in the object. To deal with that UNPROTECT/words could be supported for an object! value.

UNPROTECT object! would unprotect the object and its words, but not their values. UNPRODUCT/deep object! would unprotect the object, its words, and their values. UNPROTECT/words object! would only unprotect the words of an object, but not the object itself or the values of the words. UNPROTECT/words/deep object! would also unprotect any values assigned to the words, but still not unprotect the object itself.

This ticket is split off of #1012.

; For this value of o: 
>> protect/deep o: object [a: 10 b: [20]] 

; To allow adding words to o, and allow modification of words already in o, but not affect their values: 
>> unprotect o 
; To allow modification of words already in o, but not affect their values or the object itself: 
>> unprotect/words o 
; To allow modification of words already in o and their contents, but not affect the object itself: 
>> unprotect/words/deep o
; To allow adding words to o, and allow modification of words already in o or their values:
>> unprotect/deep o

Imported from: CureCode [ Version: alpha 65 Type: Wish Platform: All Category: n/a Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1015

Comments:


Rebolbot mentioned this issue on Jan 12, 2016:
set system can crash
UNPROTECT /unlock option
PROTECT overprotects objects
SYSTEM/MODULES needs access controls, similar to SECURE
PROTECT/HIDE returns the value it is meant to hide
Loophole to add words to modules after creation -- uses BIND? and SELF


Rebolbot added Type.wish and Status.important on Jan 12, 2016


@Oldes
Copy link
Owner

Oldes commented Apr 2, 2020

Implemented in the Oldes/Rebol3@1e55b65

@Oldes Oldes closed this as completed Apr 2, 2020
@Oldes Oldes added the Oldes.resolved Bugs/wishes with Oldes' fixes/features label Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants