Re:Admitting that Functional Programming Can Be Awkward
by utx00 on Tuesday June 16, 2009 @10:36AM
(#660223)
i think pure functional programming is not a practical possibility. functional systems are functional until they are not (scheme's set!, clojure's transactions, ....) maybe the important thing is to keep in mind which parts of your system mutate data, and which parts do not.
[ Parent
| on HN ]
Re:Admitting that Functional Programming Can Be Awkward
by mgreenbe on Tuesday June 16, 2009 @12:39PM
(#660462)
Right -- like Haskell, for example. Mixed paradigm programming is surely the way to go; ideology is surely the wrong way. C and OCaml both support mixed programming, but Haskell supports it better: monads allow you to isolate the side-effecting portions of your program. It's funny that the OP mentions Backus' FP, which had a "job control" language that functioned like the IO monad.
Re:Admitting that Functional Programming Can Be Awkward
by utx00 on Tuesday June 16, 2009 @12:44PM
(#660479)
or even adding an "n" in front of the function name goes a loooooooong (emphasis on the "o") way towards helping. nconc, nreverse ...
Re:Admitting that Functional Programming Can Be Awkward
by didroe on Tuesday June 16, 2009 @12:10PM
(#660408)
This is exactly the idea I had a while ago. I was talking with a friend and we were designing a language where you would have pure and impure functions. That way you can easily see what's going on and what to expect but you don't have to jump through a load of hoops when modifying a bit of state would have done the job.