3 ms·
If instead of changing the allow list from a vector to optional vector, it was changed, for whatever reason,to a vector of vectors, wouldn't the monomorphic exa
by gpderetta 3y ago
If instead of changing the allow list from a vector to optional vector, it was changed, for whatever reason,to a vector of vectors, wouldn't the monomorphic example compile and silently do the wrong thing?
Even if you buy the thesis, the example is not terribly convincing.
- frenchy 3y agoThis is a good point, even without polymorphism there are risky refactors, but the polymorphism increases the number of potential risky refactors. On top of that, it might be a lot more obvious that turning a vector into a vector of vectors might be risky, but that you can iterate on Option won't be top-of-mind to everyone.