Skip to content
Prev 26657 / 63424 Next

C/C++ 'assert' should not be used in R packages

On Nov 10, 2007, at 1:05 PM, Duncan Murdoch wrote:

            
Me too. A package should never intentionally close the R session. If  
it does, it is a very severe design bug in the package (IMHO).  
Anything you use assert for can be gracefully handled (as opposed to  
let's say a segfault), so there is no excuse for killing the whole  
process at all (deliberately wiping all user's work is rude to put it  
mildly). Even if it might be unsafe to run anything, I'd still want  
to attempt to save my data.

Cheers,
Simon