[Haskell] System.FilePath survey
waldmann at imn.htwk-leipzig.de
Fri Feb 3 07:14:40 EST 2006
> * Have you used the existing FilePath module
No, but I rolled my own (years ago)
> * Will you be happy with a library that represents the file path
> as String?
(If I see data represented by String, chances are that someone forgot to
define an ADT. See Refactoring, Code smells, primitive obsession.)
> The disadvantage is that
> with the current IO library we should convert from ADT to String and
> back again each time when we have to do any IO.
Irrelevant for performance, I think. If I want to do heavy IO, then I'd
open a file (once) to get a handle, and use only the handle afterwards.
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
More information about the Libraries