A statement is a node in a list, while an expression is a node in a tree.
This is important, because a list is isomorphic to a tree formed by pairs whose right leaves recurse.
That is, a list x, y, z, w
is no different from a tree x, (y, (z, w))
.
As it stands, even in "expression-oriented" languages such as Lisps or Haskell/MLs, statements can be introduced as easily as
(defun do
[x ...xs] (ignore x (do xs...))
[x] (return x))
or
(;): a -> b -> b
x; xs = ignore x then xs
which can be used as
(do
(println "h")
(println (time :UTC))
(println 42))
and
main =
println "h";
println $ time UTC;
println 42
respectively.
Both are examples of statements in languages whose grammars have nothing called "statement."
From the above, it then reasons that whether or not a language has first-class support for statements is a stylistic choice based on personal preferences.
The main two reasons for a language designer to make such a choice are
- whether or not the language being worked on has a high number of built-in or heavily used operations which both
- are to be used sequentially
- and/or have no meaningful result,
- and way more importantly, how the language designer wants her language to look like.