yeah i mean if you grok the underlying workings of scanf then there’s no problem
i’d just argue that the problem is understanding what you need to understand is the problem with straight c, and with any language like c++ where you’re liable to shoot thineself in thy foot
I’m wondering now how much you could add without introducing any footguns. I’d guess quite a bit, but I can’t really prove it. Smart pointers, at least, seem like the kind of thing that inevitably will have a catch, but you could read in and process text from a file more safely than that, just by implementing some kind of error handling.
yeah i mean if you grok the underlying workings of
scanf
then there’s no problemi’d just argue that the problem is understanding what you need to understand is the problem with straight c, and with any language like c++ where you’re liable to shoot thineself in thy foot
I’m wondering now how much you could add without introducing any footguns. I’d guess quite a bit, but I can’t really prove it. Smart pointers, at least, seem like the kind of thing that inevitably will have a catch, but you could read in and process text from a file more safely than that, just by implementing some kind of error handling.