
I wrote about this in the context of Miranda some time ago … https://kar.kent.ac.uk/20889/1/interactive_thompson.pdf https://kar.kent.ac.uk/20889/1/interactive_thompson.pdf Simon
On 28 Mar 2019, at 18:51, Ian Denhardt
wrote: The basic problem is just that it's error prone when you're doing things that are non-trivial wrt the lifetime of the file. Part of the original motivation for Haskell's "purity" was that lazy evaluation and side-effects are hard to think about. In languages that allow it, "don't mix laziness and effects" is a bit of common folk-wisdom. See e.g:
https://stuartsierra.com/2015/08/25/clojure-donts-lazy-effects
If I'm writing a simple program that just reads in some data, does stuff, and spits it back out, I usually don't stress about it. But for long running programs, file descriptor leaks can be a problem, and between that and needing to be async-exception safe, the usual resource management strategies in Haskell make the whole thing pretty dicey.
Quoting Vanessa McHale (2019-03-28 14:26:22)
the second issue could be better resolved with linear types!
How would this work? Not sure I follow. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson@kent.ac.uk mailto:s.j.thompson@kent.ac.uk | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt http://www.cs.kent.ac.uk/~sjt