One of the consistently hardest problems across my entire programming career is
-
One of the consistently hardest problems across my entire programming career is
"Some of my code is invoked by callbacks from code I do not control, and due to vague documentation I cannot predict the order in which the callbacks will be called"
Object oriented programming appears to exacerbate this, because it means you have a lot of callbacks that don't look like callbacks.
-
One of the consistently hardest problems across my entire programming career is
"Some of my code is invoked by callbacks from code I do not control, and due to vague documentation I cannot predict the order in which the callbacks will be called"
Object oriented programming appears to exacerbate this, because it means you have a lot of callbacks that don't look like callbacks.
This turns up the most often and the nastiest when initializing objects, as if objects/systems A and B are interdependent then they potentially get into situations where they depend on the other object being partially or completely initialized in order to complete their own initialization process, and "I'll just make sure both objects are fully initialized before they start interacting" can be impossible if external code might start calling your virtual methods without this being well documented
-
This turns up the most often and the nastiest when initializing objects, as if objects/systems A and B are interdependent then they potentially get into situations where they depend on the other object being partially or completely initialized in order to complete their own initialization process, and "I'll just make sure both objects are fully initialized before they start interacting" can be impossible if external code might start calling your virtual methods without this being well documented
@mcc the really nasty one I ran into that we just gave up on was static object cleanup at process shutdown time. On top of all the other stuff c++ doesn't specify the ordering for destruction of these objects fully, so they have to be somehow tolerant of the destructor invocation order changing between runs.
-
undefined oblomov@sociale.network shared this topic on