3 ms·
If I write a function without "static" it means I want to allow functions in other modules module to call it, it isn't implied that it will be actually called.
by HelloNurse 9y ago
If I write a function without "static" it means I want to allow functions in other modules module to call it, it isn't implied that it will be actually called.
Real life analogy: declaring a static function is like locking your car because you don't want it stolen: only hackers can access it through forbidden means.
If instead you leave your nonstatic car parked in the street, open and with keys in the ignition, you are making it easy to steal (probably you want it to be stolen, there might be an UB corpse in the trunk you want to get rid of), but you cannot be sure that a thief will actually come along and take it away; you are just advertising that they should.