3 ms·
True, however in practice this is rarely an issue. You usually only use a tiny subset of construction rules. And if you ever make a mistake, they are easily cau
by bun_terminator 2y ago
True, however in practice this is rarely an issue. You usually only use a tiny subset of construction rules. And if you ever make a mistake, they are easily caught by static analysis tools.
- smackeyacky 2y agoIt’s quite a big issue. It’s actually a bit worse than the article makes out if you throw static objects into the mix and get race conditions where you don’t know which objects get constructed first. C++ has to be approached with caution even by experienced devs.
- bun_terminator 2y agoexperienced (and even the not so much) devs know the perils of static initialization and avoid it.
- maccard 2y agoI agree with the parent - global initialisation order is a once-bitten-never-again, and the reality is that working in most codebases doesn't require understanding all of these rules - knowing the quirks is usually only required by one or two people and the rest can work with what they've got.
- TinkersW 2y agothat is a novice issue, it is easily avoided