3 ms·
Not sure where you get all this idea of complexity from, lazy streams are used in functional languages a lot for data processing and they are not incomprehensib
by xfer 8y ago
Not sure where you get all this idea of complexity from, lazy streams are used in functional languages a lot for data processing and they are not incomprehensible, also imperative languages like rust has iterators that are more used than for/while loops.
- jstimpfle 8y agoWell, I described the situations from which I get my ideas of complexity... Regarding iterators, I'm fine with their usage depending on what they _do_. However I don't think it's a good idea to iterate over an abstract stream that under the hood does sorts and zips and folds. Because you lose control and understanding how much intermediate data will be produced (constant small amount? 3 times the amount?), and in what order code gets executed. And if you think consciously about the intermediate data you probably can use it for a whole lot of other things! In Haskell, unexpected memory expansions and duplication of work can happen. And these problems are not nice to debug. I might be generalizing too much, though. Maybe you're talking about short-lived web applications that never see a large amount of data, or something like that.