Timeline for Should I still use Debug.Assert today?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 17, 2014 at 12:35 | comment | added | jk. | @DougM performance critical code, its a reference to the knuth quote. I'd also add that I think the heartbleed bug demonstrates that my view is the correct one, unless you have no other choice, do not elide precondition checks in your release code | |
| Feb 28, 2014 at 14:08 | comment | added | DougM | What's that 3% then, @jk? Only legacy code, or some other instance? | |
| Jan 10, 2013 at 12:50 | comment | added | jk. | @Konamiman that's the point, I almost always want it to fail in the same way in release mode :. Debug.Assert is of no use to me 97% of the time | |
| Jan 10, 2013 at 12:47 | comment | added | Konamiman | It is worth to mention that generating code with Visual Studio in release mode will cause all calls to methods of the Debug class to be skipped from compilation... so suppressing calls to Assert simply for performance is not just premature optimization, it is a plain nonsense. | |
| Jan 10, 2013 at 12:35 | history | answered | jk. | CC BY-SA 3.0 |