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

An infinite data source? That sounds like a thunk (which is easy to implement), or perhaps it really is a channel?


The beauty is - it doesn't _matter_.

It could be a linked list that links back to it's own head. It could be a network stream, or a series of events from an input device. The program doesn't have to care.


You should read up on channels and generators then. The source doesn't matter, just the type contract.

It's a different way of approaching things. I'd say that golang was stream-based rather than functional or imperative.




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

Search: