2 ms·
Welcome to the C standard library, the application of mutable global state to literally everything in it has to be the most consistent and predictable feature o
by josefx 2y ago
Welcome to the C standard library, the application of mutable global state to literally everything in it has to be the most consistent and predictable feature of the language standard.
- Sharlin 2y agoI mean, I'm sure it was an okay solution on PDP-11.
- liontwist 2y agoI used to think this was bad too. But when C was designed an entire single threaded program was considered the unit of encapsulation for functionality. Now it’s mostly libraries. The former allows you to design a coherent system. a lot of design questions which are annoying (“how do I access config data consistently, etc) become very clear. It also makes C more productive. If global vars and static locals are unbanned, features like closures become less important.