Principles of Wolfram Language
Principle of Wolfram Language Syntax
- Everything is a Expression.
- Expression is either an atom, or a list of atoms in the form
a[b, c etc], arbitrarily nested.
- Atom is a number e.g.
3.4, a Symbol
"cat", or special character e.g.
- There are many short syntax for function or function call. For example:
List[1,2,3]can be written as
Set[x,2]can be written as
Plus[1,2]can be written as
1+2. WolframEngine transform any short syntax to the fully nested form
a[b, c etc]internally before computation. [see WolframLang Syntax/Operators]
- WolframLang code is just a sequence of expressions, practically just function calls. Knowing what function to call is the essence of coding WolframLang. [see WolframLang: List Functions, Find Function]
How Does Wolfram Language Do Computation
There are 2 ways WolframLang does computation.
- Function call. Either builtin or user defined. For example,
If[3 > 2, "yes", "no"]
- Syntactical transformation by pattern matching and replacement. (aka term rewriting system)