If a test is called in a det context, the compilation will error. This is good, I hope we can agree.
Sometimes, though, you don't really care about what happens in the failure case, and instead would want to abort the program. Automatically generating such code would reduce boilerplate code written.
Consider the following:
?lst = [1,2,3]
if { lst^head = ?h ::
pass
| else ::
!error("no head")
}
!print(h)
In such a case, we could via some static analysis know that the head call cannot fail. Alternatively, as the programmer, we may wish to handle this, but of course make it explicit. Consider this:
?lst = [1,2,3]
?head(lst) = ?h
!print(h)
The preceding ? says "I know this is a test, and if this fails call !error". The compiler could automatically generate the if here, which would allow for the !error call to have the call position resource set appropriately.
While this probably isn't ideal, I think it could be handy if you want to do something in an admittedly hacky way.