Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Comment Re:Mmmm, Kay. (Score 1) 439

It's quite appropriate to view a stream of ethernet frames as infinite, in the sense of being of indeterminate size (infinite = without end). If you don't have infinite data-structures (which really just means that the language is taking care of all the bounds checking for you), your code will be cluttered with all kinds of termination checks.

When you have a process that produces a boundless amount of information (and the IO examples given are such processes), and you don't know how much of it you might need to consume, an infinite data structure might be an appropriate abstraction. It's a little pedantic to point out that in reality, any actual stream will be finite in length, and it completely misses the point. The point is that Haskell makes it possible to model these indeterminately long streams with compact and logical syntax. The only penalty is that the programmer needs to be comfortable using and understanding more abstract programming concepts.

Slashdot Top Deals

Memory fault - where am I?

Working...