[Haskell-cafe] How to move files?

Henning Thielemann lemming at henning-thielemann.de
Thu Apr 15 14:20:33 UTC 2021


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.


More information about the Haskell-Cafe mailing list