Welcome to Statements vs Expressions in [A]synchronous Functional Programming. This article will cover and compare statements and expressions used in the pure context and in the contexts of various programming paradigms, including that of the [A]synchronous functional programming paradigm.
Imperative Programming
The term "statement" originates from the imperative programming paradigm, where a program is thought of as a series of statements that change the state of a process. In the context of imperative programming, a statement is a syntactic unit that expresses some action to be executed, and may be composed of expressions.
Functional Programming
Functional programming is a declarative programming paradigm where a program is constructed as a composition of functions, rather than as a series of statements. In functional programming, functions are expressions and first-class entities similar to numbers and strings, and programs are trees of function expressions.
Statements and Expressions
Statements and expressions are both considered heavily within the contexts of the various programming paradigms, but can also be considered in a pure context outside that of a programming paradigm. In the pure context, a statement is a declaration or remark that conveys information, opinions, or facts. In the pure context, an expression is a representation or manifestation that conveys an idea, opinion, or thought.
In the pure context, statements and expressions are similar entities. Both statements and expressions convey information, and both are some kind of manifestation. In the pure context, there isn't a significant difference between statements and expressions in meaning or connotation.
[A]synchronous Functional Programming
[A]synchronous functional programming adapts the imperative programming notion of statements and expressions relative to statements. In [A]synchronous Functional Programming, a statement is a syntactic unit composed of expressions that expresses some execution.
[A]synchronous functional programming adapts the functional programming notion of a program. In [A]synchronous Functional Programming, functions are expressions and first-class entities, and programs are trees of function expressions. [A]synchronous functional programming allows for imperative statements within function declarations. [A]synchronous functional programming allows for programs to be series of statements in addition to trees of function expressions in that programs are function definitions, and series of statements can be the contents of those programs.
Conclusion
Statements and expressions are similar entities. Both statements and expressions convey information, and both are some kind of manifestation. In the context of imperative programming and [A]synchronous functional programming, statements and expressions are also similar entities, where statements are syntactic units that are composed of expressions. [A]synchronous functional programming shares with functional programming the notion of a function as an expression and first-class entity.


