Wolfram Language

The Wolfram Language is a proprietary, general very high-level multi-paradigm programming language developed by Wolfram Research. It emphasizes symbolic computation, functional programming, and rule-based programming and can employ arbitrary structures and data. It is the programming language of the mathematical symbolic computation program Mathematica.

History
The Wolfram Language was a part of the initial version of Mathematica in 1988.

Symbolic aspects of the engine make it a computer algebra system. The language can perform integration, differentiation, matrix manipulations, and solve differential equations using a set of rules. Also, the initial version introduced the notebook model and the ability to embed sound and images, according to Theodore Gray's patent.

Wolfram also added features for more complex tasks, such as 3D modeling.

A name was finally adopted for the language in 2013, as Wolfram Research decided to make a version of the language engine free for Raspberry Pi users, and they needed to come up with a name for it. It was included in the recommended software bundle that the Raspberry Pi Foundation provides for beginners, which caused some controversy due to the Wolfram language's proprietary nature. Plans to port the Wolfram language to the Intel Edison were announced after the board's introduction at CES 2014 but was never released. In 2019, a link was added to make Wolfram libraries compatible with the Unity game engine, giving game developers access to the language's high level functions.

Syntax
The Wolfram Language syntax is overall similar to the M-expression of 1960s LISP, with support for infix operators and "function-notation" function calls.

Basics
The Wolfram language writes basic arithmetic expressions using infix operators.

Function calls are denoted with square brackets:

Lists are enclosed in curly brackets:

Syntactic sugar
The language may deviate from the M-expression paradigm when an alternative, more human-friendly way of showing an expression is available:


 * A number of formatting rules are used in this language, including TeXForm for typeset expressions and InputForm for language input.
 * Functions can also be applied using the prefix expression @ and the postfix expression //.
 * Derivatives can be denoted with an apostrophe '.
 * The infix operators themselves are considered "sugar" for the function notation system.

A FullForm formatter desugars the input:

Functional programming
Currying is supported.

Pattern matching
Functions in the Wolfram Language are effectively a case of simple patterns for replacement:

The := is a "SetDelayed operator", so that the x is not immediately looked for. x_ is syntax sugar for Pattern[x, Blank[]]|undefined, i.e. a "blank" for any value to replace x in the rest of the evaluation.

An iteration of bubble sort is expressed as: The /; operator is "condition", so that the rule only applies when y>z. The three underscores are a syntax for a BlankNullSequence[], for a sequence that can be null.

A ReplaceRepeated //. operator can be used to apply this rule repeatedly, until no more change happens:

The pattern matching system also easily gives rise to rule-based integration and derivation. The following are excerpts from the Rubi package of rules:

Implementations
The official, and reference, implementation of the Wolfram Language lies in Mathematica and associated online services. These are closed source. Wolfram Research has, however, released a parser of the language under the open source MIT License. The parser was originally developed in C++ but was rewritten in Rust in 2023. The reference book is open access.

In the over three-decade-long existence of the Wolfram language, a number of open source third party implementations have also been developed. Richard Fateman's MockMMA from 1991 is of historical note, both for being the earliest reimplementation and for having received a cease-and-desist from Wolfram. Modern ones still being maintained include Symja in Java, expreduce in Golang, and the SymPy-based Mathics. These implementations focus on the core language and the computer algebra system that it implies, not on the online "knowledgebase" features of Wolfram.

In 2019, Wolfram Research released the freeware Wolfram Engine, to be used as a programming library in non-commercial software.

Naming
The language was officially named in June 2013 and has been used as the backend of Mathematica and other Wolfram technologies for over 30 years.