Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While it probably wasn't clear, that's what I was wondering about when I asked about using streams. I find using lazy evaluation by default confusing sometimes, so I think about it terms of using streams or iterators. (Or are they called generators? The kind of function that, when called, returns either the next value or an end-of-stream sentinel.)


Python calls them generators. Haskell lists display somewhat similar behaviour.

Although I still have to learn a lot, lazyness by default brings more benefits than it costs IHMO.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: