Thinking We Might Should Nix PROTECT/HIDE For Now

R3-Alpha had an interesting feature, which let you "hide" fields in contexts.

It was actually something that drew me in to the language in the beginning as "oh, that's cool".

So it has stuck around in some form, and simple examples do still seem to work:

>> obj: make object! [x: 10 y: 20]
== make object! [
    x: 10
    y: 20
]

>> protect/hide 'obj/y
== obj/y

>> obj
== make object! [
    x: 10
]

But this is a very complex feature to honor systemically. Doing it poorly is easy. Doing it pervasively and correctly is rather difficult.

In particular, what bothers me about this "user controlled hidden bit" is that I'm trying to get some system-level hidden mechanics working correctly. And the interaction between things the system needs to hide and this "user can hide anything they want" is somewhat maddening, especially because I know how hard it is to do such a thing right.

It's an intriguing feature that seems to have been a bit of an off-the-cuff experiment. I don't see it as mission-critical...and all it does is interfere with the hardening needed to solve the mission-critical problems related to contexts.

Not going to delete it immediately, but it's certainly in the crosshairs if it causes any more trouble with something I'm trying to fix.

2 Likes

A post was split to a new topic: PROTECT Back In The Hot Seat... (But Not Anymore)