On 03/10/2010 02:42 PM, James Iry wrote:
Andrei Alexandrescu Wrote:
I don't disagree with you (except that you probably meant "first
class" rather than "first order").
But that wasn't the question. The question was "does a language
have to enforce purity in order to be a functional language" and the
answer is that historically that has not been the case. The Lisp
family (especially Scheme) and the ML family both have a rich
tradition of purely functional programming without ever having the
purity enforced. They did not "adopt the functional window dressing";
they invented it.
Mutation has always been seen as an awkward concession to efficiency by
functional languages, and limited to the maximum extent possible. LISP
has commonly used a pure subset (see e.g.
http://www-formal.stanford.edu/jmc/history/lisp/node3.html) for proving
essentially everything there is to be proven regarding functional
programming.
There's one final nail in the coffin. In wake of concurrency, de jure
immutability becomes a necessity, not a useful and desirable de facto
convention. Adopting the window dressing but not the essence of FP by a
concurrent language evokes to me a scene in the Marx Brothers: an
otherwise impeccably-dressed gentleman who forgot to put his pants on.
Andrei