Next badge 0/1
~920 people reached
- 0 posts edited
- 0 helpful flags
- 16 votes cast
Can I use Dependency Injection without breaking Encapsulation?
Would that remove the sligth security risk of making internals visible?
Optimal “if-else” tree algorithm to minimize duplicate code
@Azmisov you would implement only the executions to the known variations in the factory. For everything else you would return a default that does not crash. A blind variation if you will. depending on how critical this is that function could trigger a stop of the system or just log that something unexpecteded happened.