Me wrote:

> I.Found your notion of a "sealed off namespace"
> intriguing. I have no idea what it meant just yet;
> I'm going to go read and think about it now.

I'll pitch some syntax:

        # prevent modification to %reflexive:: like so:
        package reflexive is closed;

        # allow it like so:
        %reflexive:: is not closed;


        # determine its status like so:

        unless (is closed %reflexive::) {
                # add the subs
                ...

The above is modulo a new syntax for referring to a package's
symbol table.  

What would be the limits on who or what would be allowed to open
a regular hash, that was made read-only by giving it a "closed"
property?  This would need to be well defined.  Possibly an
openswith property could be taken from a hash, before it is closed,
which could be invoked to open it again, by accessing the "open"
property while it is open.


        my %SMERSH_agent_identities = sreadfile('identities/SMERSH.sd');
        swallow(my $agent_list_mod_key = (is open %SMERSH_agent_identities);)
        %SMERSH_agent_identities is closed;

Mallory can't defame a good agent by modifying this list of bad
agents without setting it to not closed, he can't do that without
getting the key, and the key has been swallowed (whatever that means.)


Even more compact would be the setting to closed returning the capability.

        package reflexive;

        # prevent modification to %reflexive:: like so:
        my $opener = (%reflexive:: is closed);

        # re-allow modification like so:
        &$opener;


-- 
                                           David Nicol 816.235.1187
                     Keep Dan Sugalski away from my stuffed animals

Reply via email to