3 ms·
To me, the real issue is that a design decision should ideally be expressed at only one place in the code. Then, if that decision is changed, you change that on
by not2b 7y ago
To me, the real issue is that a design decision should ideally be expressed at only one place in the code. Then, if that decision is changed, you change that one place in the code. If the design decision is reflected in two or more places, chances are that when changes are made, one of those places will be missed. Some languages force you to write things twice (the prototype and the definition in C and C++), but at least the compiler helps find mismatches.