3 ms·
My claim is that the particular class of bugs relating to memory/overflows have not been an issue in my career, while bugs arising from API and language ambigui
by jstewartmobile 10y ago
My claim is that the particular class of bugs relating to memory/overflows have not been an issue in my career, while bugs arising from API and language ambiguities have caused considerable headaches.
- emmelaich 10y agoThe problems caused by language ambiguities and pointer arithmetic and addressing is exactly what makes C difficult. So, I don't disbelieve you but I've known 20 year C experts have their WTF moments when shown code that would seem to work but doesn't. But I agree that C difficulty is sometimes exaggerated - partly it's expectations. ps. by ambiguity do you mean undefined behaviour?
- thegeekpirate 10y ago> So, I don't disbelieve you but I've known 20 year C experts have their WTF moments when shown code that would seem to work but doesn't. If after 20 years they don't know the C spec well enough to know if a piece of code should work or not, I simply wouldn't consider them very good programmers.
- emmelaich 10y agoHrrm. If Jon Bentley can have a bug in his Programming Pearl book then so can anyone. https://research.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html https://research.googleblog.com/2006/06/extra-extra-read-all...
- thegeekpirate 10y agoI never said they wouldn't create bugs, but not fully understanding a line of code (outside of needing to conceptualize external dependencies) is certainly frightening after 20 years of working in C.
- ktRolster 10y agoWhat it shows is that sort of code never shows up in practical C. There's stuff in Java (and Javascript for that matter) I don't understand, and I've been programming in those for about as long as anybody.
- thegeekpirate 10y agoAbsolutely.