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

> Pure functional code just might outsource shared mutable state to an external database.

There's an important distinction between essential side-effects and inessential side-effects.

Some data you have to store in a database is an essential side effect.

Modifying iterator or flag (e.g. bool isOpen) etc. is a non-essential side effect.

Transactional semantics are probably part of the story for the former, but the author was talking about the latter.



In either case it does not follow that pure functional programming is the answer, especially as it makes "essential side effects" (which are, well, very essential), quite cumbersome. Clojure isn't pure functional, it makes essential side-effects easy, and non-essential (or, rather, dangerous) side effects hard.

I'm not saying that Clojure is the silver bullet, it's just that the article's conclusion does in no way follow from the premise.




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

Search: