top | item 38683606

(no title)

SolarNet | 2 years ago

I mean you can just not use iostream? A lot of modern C++ projects just ignore it. For either C style IO or more C++ -y IO.

discuss

order

klodolph|2 years ago

Yeah, but you can equally ignore fgetc and friends in C. My only point here is that IO in the standard library is not very good in either language.

IMO a parser should be reading the entire file, and then parsing as a block of memory, by default, for most use cases these days. That way you don’t have to think about IO while you are parsing. Streaming parsers are niche these days for good reasons.