> (constant 'foo 3)
3
> (delete 'foo)
nil
> (set 'foo 3)
ERR: symbol is protected in function set : foo
Is this a bug or is there a reason for this?
Consider this:
> (constant 'foo 3)
3
> (delete 'foo)
nil
> foo
3
> (set 'bar '123)
123
> (delete 'bar)
true
> (sym "bar" MAIN nil)
nil
>
A symbol protected with 'constant' cannot be deleted, that's why the 'delete' returned 'nil' and 'foo' was still there, unblemished.
see also here: http://www.newlisp.org/downloads/newlisp_manual.html#delete
and: http://www.newlisp.org/downloads/newlisp_manual.html#sym