HOME

TheInfoList



OR:

The Wolfram Language ( ) is a proprietary, very high-level
multi-paradigm programming language Programming languages can be grouped by the number and types of Programming paradigm, paradigms supported. Paradigm summaries A concise reference for the programming paradigms listed in this article. * Concurrent programming language, Concurrent ...
developed by
Wolfram Research Wolfram Research, Inc. ( ) is an American Multinational corporation, multinational company that creates computational technology. Wolfram's flagship product is the technical computing program Wolfram Mathematica, first released on June 23, 1988. ...
. It emphasizes
symbolic computation In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation, is a scientific area that refers to the study and development of algorithms and software for manipulating mathematical expressions ...
,
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by Function application, applying and Function composition (computer science), composing Function (computer science), functions. It is a declarat ...
, and rule-based programming and can employ arbitrary structures and data. It is the programming language of the mathematical symbolic computation program
Mathematica Wolfram (previously known as Mathematica and Wolfram Mathematica) is a software system with built-in libraries for several areas of technical computing that allows machine learning, statistics, symbolic computation, data manipulation, network ...
.


History

The Wolfram Language was part of the initial version of Mathematica in 1988. Symbolic aspects of the engine make it a
computer algebra system A computer algebra system (CAS) or symbolic algebra system (SAS) is any mathematical software with the ability to manipulate mathematical expressions in a way similar to the traditional manual computations of mathematicians and scientists. The de ...
. The language can perform integration, differentiation,
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
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 Raspberry Pi ( ) is a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in collaboration with Broadcom Inc., Broadcom. To commercialize the product and support its growing demand, the ...
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 were 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 Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation. Originally specified in the late 1950s, ...
, with support for infix operators and "function-notation" function calls.


Basics

The Wolfram language writes basic arithmetic expressions using infix operators. (* This is a comment. *) 4 + 3 (* = 7 *) 1 + 2 * (3 + 4) (* = 15 *) (* Note that Multiplication can be omitted: 1 + 2 (3 + 4) *) (* Divisions return rational numbers: *) 6 / 4 (* = 3/2 *) Function calls are denoted with square brackets: Sin i(* = 0 *) (* This is the function to convert rationals to floating point: *) N / 2(* = 1.5 *) Lists are enclosed in curly brackets: Oddlist= (* = *)


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 for typeset expressions and for language input. * Functions can also be applied using the prefix expression and the postfix expression . * Derivatives can be denoted with the apostrophe . * The infix operators themselves are considered "
sugar Sugar is the generic name for sweet-tasting, soluble carbohydrates, many of which are used in food. Simple sugars, also called monosaccharides, include glucose Glucose is a sugar with the Chemical formula#Molecular formula, molecul ...
" for the function notation system. A formatter desugars the input: FullForm +2(* = Plus , 2*)


Functional programming

Currying In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument. In the prototypical example, one begins with a functi ...
is supported.


Pattern matching

Functions in the Wolfram Language are effectively a case of simple patterns for replacement: F _:= x ^ 0 The is a "SetDelayed operator", so that the x is not immediately looked for. is syntax sugar for , i.e. a "blank" for any value to replace x in the rest of the evaluation. An iteration of bubble sort is expressed as: sortRule := /; y>z -> (* Rule ondition[List[PatternSequence[x, BlankNullSequence[, Pattern[y, Blank[">atternSequence[x,_BlankNullSequence[.html" ;"title="ondition[List[PatternSequence[x, BlankNullSequence[">ondition[List[PatternSequence[x, BlankNullSequence[, Pattern[y, Blank[, Pattern[z, Blank[, PatternSequence[k, BlankNullSequence[], Greater[y, z, List[x, z, y, k *) The operator is "condition", so that the rule only applies when . The three underscores are a syntax for a , for a sequence that can be null. A ReplaceRepeated operator can be used to apply this rule repeatedly, until no more change happens: //. sortRule (* = ReplaceRepeated sortRule*) (* = *) The
pattern matching In computer science, pattern matching is the act of checking a given sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually must be exact: "either it will or will not be a ...
system also easily gives rise to rule-based integration and derivation. The following are excerpts from the Rubi package of rules: (* Reciprocal rule *) Int /x_,x_Symbol:= Log (* Power rule *) Int _^m_.,x_Symbol:= x^(m+1)/(m+1) /; FreeQ ,x&& NeQ ,-1


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 Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
MIT License The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility. Unl ...
. The parser was originally developed in C++ but was rewritten in
Rust Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
in 2023. The reference book is
open access Open access (OA) is a set of principles and a range of practices through which nominally copyrightable publications are delivered to readers free of access charges or other barriers. With open access strictly defined (according to the 2001 de ...
. In the over three-decade-long existence of the Wolfram language, a number of
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
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 Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, expreduce in Golang, and SymPy-based Mathics. These implementations focus on the core language and the
computer algebra system A computer algebra system (CAS) or symbolic algebra system (SAS) is any mathematical software with the ability to manipulate mathematical expressions in a way similar to the traditional manual computations of mathematicians and scientists. The de ...
that it implies, not on the online "knowledgebase" features of Wolfram. In 2019, Wolfram Research released the
freeware Freeware is software, often proprietary, that is distributed at no monetary cost to the end user. There is no agreed-upon set of rights, license, or EULA that defines ''freeware'' unambiguously; every publisher defines its own rules for the free ...
Wolfram Engine, to be used as a programming library in non-commercial software. This developer-only engine provides a command-line shell of the Mathematica evaluator (with a limited number of kernels) and requires signup and license activation over the web. The freely available Jupyter Notebook/Lab project provides a protocol (ZMQ) to connect their notebooks to various languages, this is available as an alternative to the text-only CLI interface via th
Wolfram Kernel for Jupyter


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.


See also

* Notebook interface


References


External links

*
Documentation for the Wolfram LanguageAn Elementary Introduction to the Wolfram Language
{{authority control Array programming languages Notebook interface Computer algebra systems Cross-platform software Dynamically typed programming languages Finite element software Functional languages High-level programming languages Multi-paradigm programming languages Programming languages created in 1988 Term-rewriting programming languages Wolfram Research