3 ms·
> by the time this happens, the assumptions underlying the shortcut have implicitly been taken on by the code depending on it. If this has happened, your encap
by shkkmo 7y ago
> by the time this happens, the assumptions underlying the shortcut have implicitly been taken on by the code depending on it.
If this has happened, your encapsulation was insufficient or you waited too long to replace the stop gap solution or maybe your documentation wasn't clear about what assumptions made by the throwaway component are safe to make in the main codebase.
> The only time when it can actually be allowed is when it it concerns a feature that is a pure leaf in the system with nothing else built on top of it.
I think the article's description of when stopgap solutions should be used is far better. Yes, a leaf feature is likely to have fewer encapsulation issues, but that is only part of it.