On Thu Nov 30 22:00:39 2023 +0000, Zebediah Figura wrote:
I don't like this pattern; in cases like this we should instead just split up the init_stream() helper to the part that's done on initialization and the part that's done on recreation. That said I would imagine more of this should be done on initialization...?
They're a bit intertwined; reader->streams can't be allocated before stream_count is known, which requires creating the wg_parser.
But yes, creating the reader from two places is cleaner than these conditionals, even if it's a few more lines of code.