3 ms·
What do you mean by this sort of defensiveness? Can you give an example?
by josephg 3y ago
What do you mean by this sort of defensiveness? Can you give an example?
- ehnto 3y agoFor example in a plugin system, I can say you must inherit from BasePlugin and in code I can enforce that, BasePlugin can then have some protected functions that I can disallow from being overridden. It's good for frameworks and extensible systems where your code needs to guarantee certain things will happen when running third party code.