Package Bulletproofing

The Wolfram Language makes it easy to "bulletproof" packages, and prevent features of their environment from affecting their internal operation.

Localizing Variables »

Module localize names of variables

Namespace Bulletproofing

BeginPackage isolate names by declaring a separate context for package functions

Begin isolate names in the implementation of a package

Symbol Protection

Protect protect a symbol against redefinition

ReadProtected protect against definitions being read

Locked attribute to prevent protection from being changed

Evaluation Bulletproofing

Block block out changes to system or other variables

BlockRandom block out reseeding of pseudorandom generators

CheckAbort  ▪  TimeConstrained  ▪  MemoryConstrained  ▪  PropagateAborts

Error & Exception Handling

Confirm confirm that evaluation of an expression does not generate a failure

Enclose catch errors detected by Confirm, etc.

ConfirmBy  ▪  ConfirmMatch  ▪  ConfirmQuiet  ▪  ConfirmAssert

Assert abort if an assertion fails

Evaluation State Bulletproofing

WithCleanup run cleanup code even if an evaluation is aborted

AbortProtect protect the evaluation of an expression from aborts

Function Bulletproofing

CheckArguments issue messages for incorrect arguments or options

ArgumentsOptions separate arguments and options for a function

Version Compatibility

$VersionNumber Wolfram System version number for comparisons

$SystemID short description of computer system

Notebook Interface Bulletproofing

Deploy  ▪  Selectable  ▪  Editable  ▪  Visible  ▪  CellContext