LISP vs WolframLang

By Xah Lee. Date: . Last updated: .

The major influence of WolframLang is LISP and APL. [see LISP / APL Root in Wolfram Mathematica]

LISP in WolframLang

WolframLang has all the characteristics of LISP:

APL in WolframLang

APL's contribution to WolframLang are:

Here's a table of comparison of LISP and WolframLang.

Syntax

LISPWolframLang
(f a b c) f[a, b, c]
; comment (* comment *)

Expression Grouping

LISPWolframLang
progn CompoundExpression or ;

Arithmetic

LISPWolframLang
+ Plus or +
- Minus or -
* Times or *
/ Divide or /
% Mod
expt Power or ^
floor Floor
ceiling Ceiling
round Round

Boolean, Equality Test

LISPWolframLang
t True
nil False , Null
and And or &&
or Or or ||
not Not or !
> Greater or >
>= GreaterEqual or >=
< Less or <
<= LessEqual or <=
=, eq, equal, string-equal Equal or ==, SameQ or ===,

Variable and Assignment

LISPWolframLang
setq Set , SetDelayed
let Module, Block, With.

Flow Control

LISPWolframLang
if If
cond Which, Switch
throw , catch Throw , Catch
error Abort

Loop, Iteration

LISPWolframLang
while While
mapcar Map
mapc Scan
dotimes Do

Data Structure

LISPWolframLang
list, vector List
association list, hash table Association

Function

LISPWolframLang
defun, lambda Function
defmacro SetDelayed
funcall, apply Apply

Input Output

LISPWolframLang
print Print

Package, Namespace, Loading

LISPWolframLang
load Get
require Needs
features $ContextPath
autoload DeclarePackage

Reader Macro, Evaluation Control

LISPWolframLang
quote, ', ` Hold , HoldComplete
eval , , Evaluate
,@ Sequence

WolframLang History and Lisp