Projects often use third party libraries, which code interfaces to. As the same held for your project, the third part libraries also involve during time. Issues are fixed, new features are added, but also possible new issues will be introduced. Should you update, and keep track of the latest greatest library or use the argument “if it ain’t broken don’t fix it” and stay with the old? What are the pro’s and con’s of each scenario?
Read More…
Within C++, you have the const keyword, that can be used to say to the one which calls the method that the argument which passed through the const parameter won’t be changed within the method. This is merely adding a contract. Sure, the compiler does some checking for you, but still it is possible to change the value of your const parameter. See for example this nice example (obtained from https://isocpp.org/wiki/faq/const-correctness#aliasing-and-const):
Read More…
Posted in
Best practices,
C#,
C++ at August 3rd, 2016.
No Comments.