Dealing with Calling nb_current with undefined global invokes user:exception hook · Issue #868 · SWI-Prolog/swipl-devel · GitHub, I decided to have a special no value in global variables. This would also allow us that backtracking which takes us back to before the first b_setval/2 to delete the variable rather than binding it to []
.
I’ve implemented this and, except for having to adjust the tests that verify resetting to []
this doesn’t seem to have any consequences for any of the other tests.
Deleting is obviously cleaner than resetting to []
. Is it worth the incompatibilities that may result from it?