Package Development

The Wolfram Language is to its core a fundamentally extensible system, in which efficient, modular, reusable packages of any size can readily be created. The Wolfram Language's symbolic program and interface architecture allows it to provide a uniquely flexible modern software development environment with many important original features.

Modularity Constructs »

Module localize names of variables

Block localize values of variables

DynamicModule localize interface constructs

WithCleanup run cleanup code before returning a result

Namespace Management »

BeginPackage, EndPackage set up namespaces for a package

Begin  ▪  End  ▪  $ContextPath  ▪  $Packages  ▪  Names  ▪  CellContext  ▪  ...

Package Loading & Saving

Needs load a package if needed

Save save definitions for symbols and functions

DeclarePackage  ▪  DumpSave  ▪  Encode  ▪  ...

Initialization

Once evaluate an expression once only in a particular session

Options Management »

Options  ▪  SetOptions  ▪  OptionsPattern  ▪  OptionValue  ▪  ...

CheckArguments check option names and argument count for a function

ArgumentsOptions separate options and arguments for a function

Messages »

Message  ▪  MessageName (::)  ▪  Check  ▪  Assert  ▪  Quiet  ▪  ...

Error & Exception Management »

Confirm  ▪  Enclose  ▪  ...

Syntax Coloring

SyntaxInformation specify automatic syntax annotation

Package Editing

File New Package (.wl) create a package file to edit as a notebook

Packages from Notebooks

Initialization Cell define a cell to be used as initialization

Notebook History show editing history of a notebook

Object-Oriented Definition

UpSet (^=) associate a definition with an inner construct

TagSet (/: ... =) associate a definition with any construct

Error Handling

$Failed  ▪  Failure  ▪  FailureQ  ▪  MissingQ  ▪  Success

Bulletproofing »

Protect  ▪  AbortProtect  ▪  $VersionNumber  ▪  $SystemID  ▪  BlockRandom  ▪  ...

Wolfram Language Scripts »

wolframscript run standalone executable scripts

$ScriptCommandLine script command-line arguments

Wolfram Function Repository »

ResourceFunction a function in the Function Repository

DefineResourceFunction  ▪  ResourceSubmit  ▪  ...