[Haskell-cafe] Doubting Haskell

Bryan O'Sullivan bos at serpentine.com
Sat Feb 16 20:11:59 EST 2008

Donn Cave wrote:

> But in Haskell, you cannot read a file line by line without writing an
> exception handler, because end of file is an exception!

Ah, yet another person who has never found System.IO.hIsEOF :-)

Whereas in C or Python you would check the return value of read against
zero or an empty string, in Haskell you call hIsEOF *before* a read.


More information about the Haskell-Cafe mailing list