On Tue, 2018-12-18 at 12:20 +0000, Kagamin via Digitalmars-d-announce wrote:
> On Tuesday, 18 December 2018 at 10:19:14 UTC, Russel Winder wrote:
> > Clojure is but you have to work hard for that, the initial 
> > language is effectively pure.
> 
> https://ideone.com/y8KWja clearly it isn't, its site only claims 
> that most code happens to be pure, but it looks like it's not 
> checked in any way and not sure if purity can be even checked 
> there.

Can we all agree that Haskell is a pure functional language. I think we must
because: a) it says it is, and b) it is.

   f2 = print "Hello World."
   f1 = f2
   main = do
     f1

result of running this:

   GHCi, version 8.0.1
   >
   "Hello World."
   >

OK so Haskell uses monads and Clojure just uses the JVM I/O. Haskell is pure,
Clojure is impure. But I stand by my original statement: Clojure is best used
as a pure language.

Even if I/O is impure, you can make it pure with monads if you really have to.
 
-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to