|
|
|
|
|
by dllthomas
2559 days ago
|
|
> Why is it possible to "close" a file? Because the program we're compiling needs to work on actual computers, running under actual (usually at least vaguely POSIX) operating systems. In that context, it's unavoidable that the set of open file descriptors sometimes matters. It can matter because of resource limits. It can also change whether another process gets an SIGPIPE versus blocking forever. It can affect locking. |
|
i guess i would ask why it's possible to close a file that's going to be used after it's closed? will linear types[1] solve this?
[1] https://gitlab.haskell.org/ghc/ghc/wikis/linear-types