DELAPARRA
Index
Color
NL
Category: Programming paradigms

S-Expression

Explained by Updated

What is S-Expression?

S-Expression: A nested-list notation, e.g. (+ 1 2), that represents both code and data uniformly in Lisp-family languages. An S-expression is the nested list notation used by Lisp languages. (+ 1 2) is a list whose first element is the operator and the rest are arguments. The same notation represents both code and data.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about S-Expression

How is S-Expression used in practice?

That uniformity is the source of Lisp's power. Because programs are lists, a program can build, inspect and transform other programs easily, which makes macros natural.

What should you keep in mind with S-Expression?

The parentheses put many people off at first, but the structure is very regular, and good editors make it easy to work with. S-expressions also show up as a simple data format, much like JSON, and their influence is visible in tools that represent code as trees. Clojure, Racket, Scheme and Emacs Lisp are the places you are most likely to meet them today.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.