4
alyx
7y

C++: the Static Initialisation Order Fiasco. If you have two static instances in separate translation units, there is no way to guarantee their initialisation order, you're at the mercy of the compiler/linker. If one of the instance constructors depends on the other already being initialised, you have a 50% random chance of your program blowing up. The same ordering problem applies to global destruction at program termination time.

Comments
  • 0
    Is C++ the only language you know or why is your favorite?
  • 0
    @Yeah69 I know C# as well, as well as a handful of others. I don't know that I'd call either of them my favourite - I like that C++ allows me low-level memory access, but I'm also very fond of how quickly I'm able to prototype things in C#.
Add Comment