11 ms·
My impression was some of those expressions were added to the compiler specifically to make stream fusion work well enough to use. Even if so, it’s a good point
by wrs 6y ago
My impression was some of those expressions were added to the compiler specifically to make stream fusion work well enough to use. Even if so, it’s a good point that laziness makes streams more “natural” in Haskell so that was just a performance improvement, not a semantic change. Certainly laziness is a big “philosophical difference” between the two!
- eru 6y agoYes. And laziness works because Haskell is pure-by-default. Yes. Though if we were starting from scratch today, perhaps we would see a total language, ie one where all functions terminate. That would allow the compiler much more freedom in how to order evaluation.