by teo_zero · 1y ago · 0 comments
While I understand the desire to support one input interface for composability, reuse, etc. I can't help wondering why 'FILE*'. Isn't reading from a string more "universal"?
> If the user has a c-string, the string can be easily wrapped by `funopen()` or `fopencookie()` to provide a `FILE*` adapter layer.
And if the user has a file, it's easy to read it into memory in advance.
What's the benefit of FILE* over a string?