Reference Guides » Undocumented Contexts

Internal

The "Internal`" context is one of the core contexts that Mathematica uses. It's got no targeted focus, but rather appears to be a place where developers dump the cruft they don't know what to do with.

Bag

Provides a general purpose container that has efficient push and pop behavior. Especially useful in Compile .

See here

StuffBag

Used with Internal`Bag

See here

BagPart

Used with Internal`Bag

See here

WithLocalSettings

Allows for a setup block that will be evaluated before a code block and a tear-down block that will evaluate no matter what errors are raised in the code block . This is highly-useful for error handling.

The function GeneralUtilities`SetupTeardown provides a mild generalization on this.

See here or here

InheritedBlock

Allows for definitions to be preserved, but otherwise uses Block semantics. Very useful for metaprogramming and overloading.

See here

WithTimestampsPreserved

This is a tricky function that tells the kernel to preserve some amount of old-state for efficiency/control reasons.

See here

LoadingPanel

This just makes a nicely formatted panel with a 9-patch Appearance argument:

 Internal`LoadingPanel@"Hello World"
412internal-635264222018588987

Handlers

A system of internal handlers for various events that occur. Generally best used with Internal`HandlerBlock .

See here

HandlerBlock

This acts in much the same way to the handlers, but can treat them in a Block -like fashion.

LocalizedBlock

Like Block but can localize some non- Symbol arguments.