The Unreal Engine C++ API has many “weak” design choices i.e. ways the API allows being used that are incorrect. Case in point how “CreateDefaultSubobject” must ONLY be called from within a constructor but this is in no way of being enforced by the compiler due to the design.
If a software design choice means the software expresses MANY incorrect possible uses that the compiler will not be able to detect this increases the burden and cost on everything and everyone downstream. Even if a mistake is not made the cost of testing and uncertainty is still increased regardless.
Improving the documentation for the C++ API regarding critical programming theory for the engine is seriously needed and requires an expert on the architecture and workings of the engine in order to write it ( not another “beginners guide” by dummies for dummies please! ).