Joachim Durchholz wrote:
>> Trying to fully evaluate an infinite data structure will result in
>> looping or memory exhaustion, and you have that possibilities in almost
>> all languages.
> 
> Yes, but I suspect that Haskell makes it easier to make that kind of bug.
> Worse, it's easy to introduce this kind of bug: just pass a list
> returned from function a to function b, not being aware that a may
> return an infinite list and that b may do something with it that
> requires that it's evaluated. In other words, this kind of bug can come
> into existence during code integration... and the type system doesn't
> warn you when you do it.

If you're worrying about some unexpected input causing a function never
to terminate, don't you also have to worry about some unexpected input
causing a function to become so glacially slow that from the user's
perspective, it *might as well* never terminate?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to