Timeline for Purest functional programming language(s)?
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 14, 2011 at 7:03 | vote | accept | Joanis | ||
| Nov 22, 2011 at 14:48 | comment | added | missingfaktor | @ThorbjørnRavnAndersen: Rephrased my answer. FWIW Haskell has IO monad and Clean has uniqueness typing which let you perform side-effects while still being pure. | |
| Nov 22, 2011 at 14:47 | history | edited | missingfaktor | CC BY-SA 3.0 | added 161 characters in body |
| Nov 22, 2011 at 11:01 | comment | added | user1249 | As printing out to the screen is a side-effect truly pure functional programs are pretty boring. | |
| Jun 15, 2011 at 2:20 | comment | added | user8709 | @mathepic - even Simon Peyton Jones refers to code using the IO monad as impure, and often says words to the effect that "Haskell is the best imperative language". What you say is important in an understanding-how-things-work-behind-the-scenes way, and also because that detail has semantic/practical implications. Still, denials of impurity in Haskell tend to leave a bad impression - they give the impression that people are trying to hide a fallacy behind a cloud of pedantry. | |
| Jun 14, 2011 at 23:12 | comment | added | Daniel Lubarov | My language has referential transparency, too. You just write program = "some C code", and then the runtime environment deals with the C code. :-) | |
| Apr 20, 2011 at 18:20 | comment | added | alternative | @Frank Shearar but it is useful to talk in a such a way because the IO monad is pure. Its the runtime library that isn't, not your code, since your main function is basically a huge state transformer. (Something like main :: World -> World behind the scenes) | |
| Dec 10, 2010 at 16:39 | comment | added | Frank Shearar | @sepp2k That's exactly what I was gently making fun of. @Larry and yet when you're writing it, it looks just like imperative calls. | |
| Dec 10, 2010 at 16:24 | comment | added | Larry Coleman | @Frank: If you're talking about the do syntax, that's not really imperative as the compiler chains the function calls together behind the scenes. | |
| Dec 10, 2010 at 13:08 | comment | added | sepp2k | @Frank: Yes, Haskell does allow side-effects, but it does more than just marking side-effect-causing code. It also maintains referential transparency even when using side-effect-causing code and that's what it makes pure - at least by many people's definition of purity. Of course that doesn't match missingfaktor's definition of "no sideeffects allowed". | |
| Dec 10, 2010 at 9:48 | comment | added | Frank Shearar | Not quite: Haskell does allow side effects (IO monad). It's just that side-effect-causing code is clearly marked as such. I don't think it's useful to talk of pure/impure languages at all (Haskell lets you program imperatively! Gasp!) but it can still be useful to talk of chunks of code (function, module, program, whatever) as being pure/impure. | |
| Dec 10, 2010 at 4:36 | history | answered | missingfaktor | CC BY-SA 2.5 |