Tag Info

Hot answers tagged

4

Use operator overloading if it improves code clarity and maintainability. Sometimes it helps clarity and maintainability: a + b is shorter and clearer than a.addTo(b), it makes it easier to write generic algorithms (e.g., templates) and change data types, etc. Sometimes it hurts clarity and maintainability: overloaded operators can be surprising ...


3

If we interpret this question in its most general sense, the proposed duplicate question has perhaps the best answer you could ever get: Too often when you try to design for the future, your predictions about future needs turn out to be wrong. It's usually better to refactor when you actually know how the needs have changed than to overdesign your ...


2

If you look at the version control diff, it's nearly impossible to see what was added as whole table has been rewritten Then don't look at the version control diff. For instance WinMerge, which is free & runs on both Windows & Linux has an option " Line differences with Whitespace: Ignoring all". Couldn't you use that? It won't show those ...


2

One possible kludge which would allow you to keep you change history but align your code correctly would be to comment out the entire existing table. And add a new correctly aligned table after it. This would/should be recorded as just two changes in the source code. After the new table been saved in the repository you can delete the commented out section ...



Only top voted, non community-wiki answers of a minimum length are eligible