Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From the first paragraph: Many functional programming languages can be viewed as elaborations on the lambda calculus. Most functional languages happen to be variations on λ-calculus, but it's not part of the definition.

Also, it's possible to write PHP in functional style, it's just not common. http://www.michielovertoom.com/software/functional-php/



Ah, selective quoting:

In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state.

All programming languages can be written in a functional style. I can create new function types in C++ with templates and function pointers to simulate the action of closures. A functional programming languages is one which has the λ-calculus as its base model of computation as idiomatic in the language. Note that the description above is exactly what is meant by "λ-calculus as the base model of computation." What the article is trying to say is that some languages can be described almost entirely as syntactic sugar on λ-calculus (or System Fω in certain cases).

You do understand that I can simulate first-class functions in any mainstream language? This is not what PL researchers mean when they say "functional programming." Functional programming languages are those which are also predominantly used in a functional style.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: