Is there static initialization order fiasco?
Dave said that it will appear.
But I don’t understand why line 3 has it.
In line 2 my_root should not be null because Root::get() must not return null.
If all these lines are static variable declarations, there is no defined order that these initializations take place as they are not executed as procedural code. That means it’s possible my_root has not executed its initialization before the initialization of me.
They are static if declared at the top-level of module/interface/package. There is no other choice. If declared inside a procedural block, then there is a choice between static or automatic. If declared in a class, there is a choice between static or non-static (dynamically allocated when constructing the class).