Skip to content

Instantly share code, notes, and snippets.

@Gabriella439
Last active March 18, 2022 17:39
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gabriella439/e1e8fdeecb58e291df4a153caec38f01 to your computer and use it in GitHub Desktop.
Save Gabriella439/e1e8fdeecb58e291df4a153caec38f01 to your computer and use it in GitHub Desktop.
Introduction for "Lightweight Functional Programming Specification"

Lightweight Functional Programming specification

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment