Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

20
  • 2
    @Doval: In an eager language you can call a lazy list a stream. In Haskell there is no real difference. Commented Dec 1, 2015 at 18:21
  • 1
    @Giorgio What I'm trying to say is that finite lists and lazy/potentially-infinite lists/streams are two different things, and Haskell's terminology muddies the water needlessly by calling the latter by the name of the former. I'm really just splitting hairs here but sometimes this sort of thing does cause confusion. It's a bit misleading to say there's no real difference in Haskell because Haskell doesn't have a type for "definitely finite" lists. Commented Dec 1, 2015 at 18:29
  • 2
    @MasonWheeler It's not a stretch to think of an IO stream as a lazy list that produces bytes or strings through black magic. Commented Dec 1, 2015 at 18:45
  • 3
    @MasonWheeler An output stream is just the black magic that creates someone else's input stream I guess. Commented Dec 1, 2015 at 18:54
  • 2
    The word stream has had a well-defined meaning at least since the 1980s (SICP). Also, I do not think that the concept of a stream used for IO is very far from that. Only the way in which you access a stream of data varies. When you are calling getc() in C you are actually pulling the next byte from a potentially infinite list / stream. Commented Dec 1, 2015 at 19:01