[erlang-questions] Does Erlang pure functional programming language?
Fri Jan 20 20:31:01 CET 2012
On 01/20/2012 10:46 AM, Tom Murphy wrote:
> On Jan 20, 2012 1:39 AM, "Ahmed Al-Saadi" < <mailto:>> wrote:
> > If you want a pure functional language, look at Haskell. A good indication that a programming language is purely functional is its use of monads.
> Monads are a way of "interfacing" between pure and impure code, so in a sense this is true, but many languages (like OCaml?) bridge the divide differently. In its essence, having pure functons simply means being able to define functions which are unable to perform side-effects. So Erlang could add support for pure functions, without really needing to change anything else within the language.
Erlang already has pure functions that are called "guards" (these functions do not create side-effects).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions