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

having side effects and having lazy evaluation are distinct features though. One can conceive of a strictly evaluated haskell-like which isolates side effects in monads and is still largely composed of pure functions.


> having side effects and having lazy evaluation are distinct features though

Fair enough, but lazyness also plays nicer with things like `if` and `&&` that comput things lazily. (Without lazyness you need to add lots of wrapper anonymous functions).

Another thins is that, from a hystorical point of view, the only reason Haskell managed to be so pure in the first place was the lazyness. If your language is not lazy its very tempting to add sideeffects.


One can conceive of it, and yet it's never been done. Curious.


Yes it has. Mercury is a perfect example of a purely functional language which is not lazy. I/O is made functional via a uniqueness typing system.


Right, so it uses uniqueness typing and not monads presumably.


There is Idris: http://idris-lang.org/

It seems similar to what plinkplonk is talking about.


Hmm, I always thought of Idris, Coq and Agda as proof assistants rather than programming languages, but perhaps that's just me being unimaginative.


Idris is explicitly billed as a programming language. You can do pretty sophisticated programming in Coq too (Coq can be reasonably straightforwardly compiled down to Ocaml, Haskell and some other languages.)


I'd better spend some time checking it out then!



I'm not really sure how "pure" Disciple can be considered to be, and it doesn't use monads does it? Perhaps I'm being ignorant though.

Mu is a great example. I wish there was more information about it publically available.




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

Search: