Isolating I/O and other side-effects?

2008-11-24 Thread dokondr
Providing that Clojure is NOT a pure functional language like Haskell, yet how can I isolate imperative-style computational structures from the main body of the functional program? How can I ensure referential transparency in Clojure? What I/O primitives Clojure provides? Thanks!

Re: Isolating I/O and other side-effects?

2008-11-24 Thread Rich Hickey
On Nov 24, 7:22 pm, dokondr [EMAIL PROTECTED] wrote: Providing that Clojure is NOT a pure functional language like Haskell, yet how can I isolate imperative-style computational structures from the main body of the functional program? You can't, other than manually. How can I ensure

Re: Isolating I/O and other side-effects?

2008-11-24 Thread Bradbev
On Nov 24, 4:44 pm, Rich Hickey [EMAIL PROTECTED] wrote: On Nov 24, 7:22 pm, dokondr [EMAIL PROTECTED] wrote: Providing that Clojure is NOT a pure functional language like Haskell, yet how can I isolate imperative-style computational structures  from the main body of the functional

Re: Isolating I/O and other side-effects?

2008-11-24 Thread Michael Reid
Is there anyway to assert that code does have side effects should never be called in a transaction? (dosync (assert (not (in-transaction - Assert: Can't call this code in a transaction That could be useful for debug builds of IO libraries. I don't know that there's anything