Get the latest tech news
Errors from `Close`
close` Posted on A while ago I wrote a blog post about "Bugs in Hello World", about how a lot of programming languages' default way of printing to stdout silently swallow errors. This led to a repo for maintaining lists of languages that do and don't have this bug, and some examples of how to fix the bug.
A while ago I wrote a blog post about"Bugs in Hello World", about how a lot of programming languages' default way of printing to stdout silently swallow errors. These are real-world concerns; for example, at one time, LLVM tools were made to close stdout, to catch errors just as we're discussing here, and it caused so many problems that this code was eventually reverted, and they no longer do. Or blame the Unix designers for selling us on the promise of "everything is a file" and encouraging the computing world to build up an entire ecosystem of software around synchronous I/O.
Or read this on Hacker News