zlacker

[parent] [thread] 2 comments
1. IlliOn+(OP)[view] [source] 2024-01-20 01:56:59
How Haskell deals with access to shared resources which are mutable by their nature, like file system, or the outside world?

(A honest question, I start to think that I'd like to learn more on this language)

replies(2): >>andyfe+i2 >>whatev+8N1
2. andyfe+i2[view] [source] 2024-01-20 02:22:19
>>IlliOn+(OP)
AFAIK they tend to operate through the IO monad, which serves to order read/write events and mark parts of your code as interacting with the global mutable state that lives outside your program.

So the mutable (or is it “volatile”?) environment is there, but you explicitly know when and where you interact with it.

3. whatev+8N1[view] [source] 2024-01-20 18:35:10
>>IlliOn+(OP)
Haskell has full support for IO and mutability. It even has software transactional memory in its standard library.
[go to top]