
15 Apr
2021
15 Apr
'21
10:20 a.m.
On Thu, 15 Apr 2021, YueCompl via Haskell-Cafe wrote:
Catch that error, and copy-and-delete. I suggest this is typical EAFP (Easier to ask for forgiveness than permission) coding style from Zen of Python http://docs.python.org//glossary.html#term-eafp
I'm very curious to know how Haskellers think and do about it?
I think this is independent from the language. With regard to file operations you must use the exception-catching style, because if you check first and operate then, it might be that in the short time between someone alters the files or directories.