什么是最简单的函数式编程语言？ [英] What is the most minimal functional programming language?
Lisp-family语言比没有类型的lambda微积分稍微多一点，利弊细胞，以及其他一些事情。我怀疑Scheme在这里是最简约的，就好像内存服务于我，它最初是作为教学语言创建的。 lambda演算的最初目的，当描述逻辑证明的时候失败了，当无类型的形式被证明是不一致的，这是一种礼貌用语，让你证明虚假是真实的。 （历史琐事：证明这一点的论文，当时是一件重要的事情，通过写一个合乎逻辑的证明，以计算术语，进入了一个无限循环。）无论如何，通过引入键入的lambda微积分来恢复逻辑。然而，这些对于编程语言来说并不直接有用，特别是因为逻辑上的声音使语言不是图灵完成的。然而，类似于Lisp从无类型的lambda演算衍生而来，一种通过内置递归扩展的类型化的lambda演算，代数数据类型以及其他一些功能可以为您提供扩展的ML语言系列。这些倾向于最低限度
变种去了，没有额外功能的纯粹的无类型lambda微积分是图灵完成的，并且大概尽可能少！然而，可以说更少的是消除这个概念完全是变量 - 事实上，这最初是为了简化关于逻辑系统的元数学证明（如果内存服务于我），并且仅使用称为 combinators 的高阶函数。这里我们有：
Sxyz = xz（yz）。在这个定义中小写字母的使用方式与变量类似，但请记住，组合逻辑本身不使用变量，或者根本不指定名称。可以肯定，组合逻辑是最小的，但不像编程语言那么友好。最着名的是 SK 组合子库。 S的定义如上例所示; K是
Kxy = x 。单独这两个组合器就足以使它完成图灵。这几乎是极其微小的。
Unlambda 是一种基于SK组合器的语言，它扩展了一些额外的特殊属性的组合器。尽管最小化了，但是可以让你编写Hello World。
尽管两个combinator比你需要的多。存在各种单组合碱基;也许最为人所知的是 iota Combinator ，定义为
x = xSK ，它用于一种极简主义语言，也称为 Iota
What is the most minimal functional programming language?
It depends on what you mean by minimal.
To start with, the ancestor of functional languages is, first and foremost, mathematical logic. The computational use of certain logics came after the fact. In a sense, many mathematical systems (the cores of which are usually quite minimal) could be called functional languages. But I doubt that's what you're after!
The simplest form is what's called the untyped lambda calculus; this contains nothing but lambda abstractions, with no restrictions on their use. The creation of data structures using only anonymous functions is done with what's called Church encoding and represents data by fundamental operations on it; the number 5 becomes "repeat something 5 times", and so on.
Lisp-family languages are little more than untyped lambda calculus, augmented with atomic values, cons cells, and a handful of other things. I'd suspect Scheme is the most minimalist here, as if memory serves me it was created first as a teaching language.
The original purpose of the lambda calculus, that of describing logical proofs, failed when the untyped form was shown to be inconsistent, which is a polite term for "lets you prove that false is true". (Historical trivia: the paper proving this, which was a significant thing at the time, did so by writing a logical proof that, in computational terms, went into an infinite loop.) Anyway, the use as a logic was recovered by introducing typed lambda calculus. These tend not to be directly useful as programming languages, however, particularly since being logically sound makes the language not Turing-complete.
However, similarly to how Lisps derive from untyped lambda calculus, a typed lambda calculus extended with built-in recursion, algebraic data types, and a few other things gets you the extended ML-family of languages. These tend to be pretty minimal at heart, with syntactic constructs having straightforward translations to lambda terms in many cases. Besides the obvious ML dialects, this also includes Haskell and a few other languages. I'm not aware of any especially minimalist typed functional languages, however; such a language would likely suffer from poor usability far worse than a minimalist untyped language.
So as far as lambda calculus variants go, the pure untyped lambda calculus with no extra features is Turing-complete and about as minimal as you can get!
However, arguably more minimal is to eliminate the concept of "variables" entirely--in fact, this was originally done to simplify meta-mathematical proofs about logical systems, if memory serves me--and use only higher-order functions called combinators. Here we have:
Combinatory logic itself, as originally invented by Moses Schönfinkel and developed extensively by Haskell Curry. Each combinator is defined by a simple substitution rule, for instance
Sxyz = xz(yz). The lowercase letters are used like variables in this definition, but keep in mind that combinatory logic itself doesn't use variables, or assign names to anything at all. Combinatory logic is minimal, to be sure, but not too friendly as a programming language. Best-known is the SK combinator base. S is defined as in the example above; K is
Kxy = x. Those two combinators alone suffice to make it Turing-complete! This is almost frighteningly minimal.
Unlambda is a language based on SK combinators, extending it with a few extra combinators with special properties. Less minimal, but lets you write "Hello World".
Even two combinators is more than you need, though. Various one-combinator bases exist; perhaps the best known is the iota Combinator, defined as
ιx = xSK, which is used in a minimalist language also called Iota
Also of some note is Lazy K, which is distinguished from Unlambda by not introducing additional combinators, having no side effects, and using lazy evaluation. Basically, it's the Haskell of the combinator-based-esoteric-language world. It supports both the SK base, as well as the iota combinator.
Which of those strikes you as most "minimal" is probably a matter of taste.