5 ms·
The exception here I think is the choice of data structure. If you know that code will be extended to accept additional fields it makes sense to be sure to use
by K0balt 3y ago
The exception here I think is the choice of data structure. If you know that code will be extended to accept additional fields it makes sense to be sure to use an extensible data structure or to ensure that side effects are contained correctly (a good idea anyway) and in a way that allows extensibility when they must be changed.
- The_Colonel 3y ago> If you know that code will be extended to accept additional fields Well, you rarely know, more often "guess". There's an important distinction between public and private interfaces. With public interfaces, I contend that it does make sense to think about future use cases and put in some flexibility even at the cost of a small overhead.
- K0balt 3y agoThat seems reasonable.