functional

James Iry jamesiry at gmail.com
Wed Mar 10 12:42:40 PST 2010


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.

> Functional programming means (a) first-order functions, and (b) 
> immutability. There are no ifs and buts about it. Every text on 
> functional programming says as much. Even Wikipedia :o), but I'd 
> recommend this classic:
> 
> https://docs.google.com/viewer?url=http://www.cs.chalmers.se/~rjmh/Papers/whyfp.pdf
> 
> The rest (lambdas, extensive use of recursion, pattern matching, let and 
> letrec, monads, system(at)ic laziness) is aftermath, i.e. mechanisms 
> that make it convenient to program given (a) and (b). There are no ifs 
> and buts about that either.
> 
> Giving FP lip service by adopting FP's window dressing and syntactic 
> sugar while at the same time not giving due consideration to FP's two 
> fundamental tenets is, in my opinion, an ungainly move in the long term.
> 
> 
> Andrei




More information about the Digitalmars-d mailing list