What's the difference between a stream and a queue? They both have the concept of an ordered set of elements, but tend to have different implementations and a different vocabulary of 'insert'/'extract' (streams) vs. 'enqueue'/'dequeue' (queue). Are these interchangable? Do they suggest different concepts or patterns? If so, what are the differences?
Concrete example of 'stream insertion': https://www.cplusplus.com/reference/ostream/ostream/operator%3C%3C/
Potentially useful conceptual pieces?
- Stream as sequence of time-function data: https://web.archive.org/web/20160603162316/https://mitpress.mit.edu/sicp/full-text/sicp/book/node69.html
- Stream as IO channel: https://en.wikipedia.org/wiki/Standard_streams
fread
,fwrite
andfseek
which makes them more like weird extensible arrays than like queues. $\endgroup$