Hi Jürgen,
Concerning the erasure of a variable, other language have such
functionality too.
Like "unset VAR" or "VAR=", by that ignoring variable content.
Even ⎕EX does not care.
Protecting names is done by )PCOPY. or ⍫, though locking a function
renders it unreadable.
And as I mentioned, when using structured variables the sequence
A.B.C←1
A ← 2
will ⎕EX 'A.B'. The name-tree is not being protected:
A
2
To protect variables against erasure/changes, functionality should be
implemented on a common level.
eg. Quad Protect Variable -> ⎕PV
⎕PV 'name'
0
⍝ name is unprotected.
1 ⎕PV 'name'
⎕EX 'name'
0
⍝ name is protected against erasure
2 ⎕PV 'name'
name ← 'new data'
PROTECTED
name ← 'new data'
^
⍝ name is protected against modification
0 ⎕PV 'name'
⍝ unprotect name
I have to apologize for my endless train of ideas.
Working 45 years with APL, I have 45 years worth of ideas on my mind :-)
Best Regards
hans-Peter