The benefits of programming with assertions (a.k.a. assert statements)
June 2008 (perspective of a Ph.D. student)
Programming with assertions
assert (p != null); // can now use p without first checking if it's null
// original code snippet: y = f(x); // code while refactoring and testing: assert(f(x) == f2(x)); y = f2(x); // code after refactoring completed: y = f2(x);
Keep this website up and running by making a small donation.
Last modified: 2008-11-15