[Haskell-cafe] Doubting Haskell
stefanor at cox.net
Sat Feb 16 20:36:02 EST 2008
On Sat, Feb 16, 2008 at 05:11:59PM -0800, Bryan O'Sullivan wrote:
> 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.
I'll bet that breaks horribly in the not-so-corner case of /dev/tty.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080216/2433c02a/attachment.bin
More information about the Haskell-Cafe