Hacker Newsnew | comments | show | ask | jobs | submit login

> Pulling and pushing bytes outside the system is trivial.

Though doing so with any performance, might not be.




Why? Haskell has excellent performance for IO.

-----


Depends on what level of abstraction you want to be at. If you use C-style IO, that's fine, but low level. If you use lazy-IO, that unfortunately made it into the Prelude, forget your performance. The Right Way is to use enumerators / left-fold based IO, or the pipe or conduit packages. But that's not trivial, yet. (Though not insanely hard, either.)

-----


It's not any worse than IO in other languages, which is the original topic.

-----


Lazy IO, which is what you get by default, if you just learn the language and use the Prelude, is worse than what you get in C.

-----


So Haskell makes IO harder by making you learn which modules use lazy I/O and avoid them? I can agree with that. But I don't think that's what people generally try to say when they claim IO in Haskell is hard or bad. People think the IO/effect segregation in Haskell makes IO bad or hard, when it's in fact just the opposite.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: