3 ms·
i think pure functional programming is not a practical possibility. functional systems are functional until they are not (scheme's set!, clojure's transactions,
by utx00 17y ago
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.
- didroe 17y agoThis 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.
- mgreenbe 17y agoRight -- 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.
- utx00 17y agoor even adding an "n" in front of the function name goes a loooooooong (emphasis on the "o") way towards helping. nconc, nreverse ...