The purpose of this document is to specify a baseline set of functional programming features that users can request and that programming languages can advertise support for. This feature set strives to be "JSON-like" and "purely functional".
The goals of this specification are (in descending order of importance):
-
Cultivate a portable functional programming style
Programmers trained to use this feature set can more easily switch between languages compatible with this specification.
-
Improve precision in communication about functional programming
"Functional programming" is an imprecise term whose meaning has evolved over time. "Lightweight functional programming" as defined in this specification aims unambiguously promote a specific flavor of functional programming.
-
Enable documentation that can be shared across multiple languages
Language documentation written to target this feature set can be shared across compatible programming languages, so long as they explain how their syntax corresponds to the features outlined within this document.
-
Encourage a baseline set of features expected of new programming languages
Many existing languages support most of these features, but often omit one crucial feature. This specification can help ensure that new language authors are less likely to make such an omission.
There are also a few non-goals of this specification:
-
Document corresponding features between existing programming languages
This specification will explain features by illustrative comparisons to existing programming languages, but this document does not aim to be a comprehensive "Rosetta Stone" for translating idioms in one language to another language. There are better resources for that, such as Rosetta Code or Learn X in Y minutes.
-
Recommend an opinionated syntax for supported features
This specification will make weak recommendations for what syntax to use when authoring educational resources for this feature set. However, compliant languages are free to use any syntax they prefer so long as they explain the correspondence to the specified feature set.