News for hackers. Stuff that matters.
Re:Why Clojure? by michaelochurch on Thursday January 15, 2015 @02:30PM (#8894782)
Being smart doesn't make you a good engineer, and being a great language or library designer doesn't necessarily make you an authority on language selection for most engineering uses. Finally, take Pike and Cox and their work on Go. Go is a great minimum-change-for-engineers language for Google's purposes. Is it a great language for most? No. But if you're trying to introduce new concepts to thousands of C++ programmers at the same time, Go is a safer bet than trying to go full Haskell.

To further answer your question, "functional programming" isn't always so well-defined. We know, realistically, that pure functional programming isn't going to work for all use cases. Once you're grounded in FP, you think of mutable state (or, in databases, destructive updates and deletes) as an optimization... but sometimes it's an optimization that you need. No language is FP-only because no language can be; even Haskell has the "dirty" IO monad.

I think that most good programmers (like, 99%) recognize the importance of immutability and referential transparency, when possible, and in the function rather than the action being the standard compositional unit for programs. Where there is disagreement is on when, how, and how often to depart from the functional ideal.

Re:Why Clojure? by karshan on Thursday January 15, 2015 @09:13PM (#8896892)
As codygman mentions the IO Monad doesn't make haskell impure.

unsafePerformIO :: IO a -> a on the other hand does make haskell impure when it is used. And it is used in many libraries.

Re:Why Clojure? by tome on Friday January 16, 2015 @03:02AM (#8897713)
> unsafePerformIO :: IO a -> a on the other hand does make haskell impure when it is used. And it is used in many libraries.

Hmm, does it really? Is 'unsafePerformIO (return 1)' impure?

Re:Why Clojure? by dllthomas on Friday January 16, 2015 @08:00PM (#8902847)
"And it is used in many libraries."

Citation needed - or at least clarification as to what "many" means here.

Re:Why Clojure? by codygman on Thursday January 15, 2015 @04:39PM (#8895553)
I don't think I'd call the IO monad "dirty" since it's still pure. Also "dirty" make it sounds like a hack.
Re:Why Clojure? by dllthomas on Thursday January 15, 2015 @07:24PM (#8896426)
Pure manipulation of values describing impure computation.
Re:Why Clojure? by codygman on Thursday January 15, 2015 @07:55PM (#8896582)
Good point.