13 ms·
You know what? If I was more confident in my coding abilities, or some seriously good static analysis tool was available for C or C++, I would program in one of
by noncoml 4y ago
You know what? If I was more confident in my coding abilities, or some seriously good static analysis tool was available for C or C++, I would program in one of those languages.
I’m really not big fan of Rust, but I love that’s it’s always looking over my shoulder for stupid mistakes.
- throwaway5959 4y agoIt’s OK. The truth is that even seasoned C/C++ developers can’t write safe C/C++ code. Otherwise exploits wouldn’t exist and static analysis wouldn’t be necessary. What are you building with Rust?
- 1024core 4y ago> The truth is that even seasoned C/C++ developers can’t write safe C/C++ code. Except DJB, of course.... ;-)
- tialaramex 4y agoNo, even DJB: https://lwn.net/Articles/820969/ https://lwn.net/Articles/820969/ > "This claim is denied. Nobody gives gigabytes of memory to each qmail-smtpd process, so there is no problem with qmail's assumption that allocated array lengths fit comfortably into 32 bits." Years later it turns out that well, "nobody" was lots of people. Not DJB of course, DJB can claim that DJB's software works exactly the way DJB intended, but for everybody else not so much.
- noncoml 4y agoI’ve been programming professionally in C since 2005 and still short myself in the foot all the time. I’m Rust I’m found various side projects. An all in one PiHole like dns server, a distributed key value store based on raft and an openwrt module. But nothing interesting or revolutionary enough to share. How about you?
- deterministic 4y ago> The truth is that even seasoned C/C++ developers can’t write safe C/C++ code I maintain a very large C++ project used to run airlines around the world that hasn’t had a bug in production for 5+ years. No crashes. No memory leaks. No production shutdown. Not even once. So no it most definitely is possible to write solid code in C++. However I do agree that it is hard :) I managed to do it by having 9000+ tests testing all aspects of the code. Another (more public) example is SQLite. I am sure there are more examples out there. Airbus avionics software is written in C for example.
- dougSF70 4y agoAn unfortunate typo, either that or it must be hard to sit at a desk.
- pjmlp 4y agoAirbus avionics software is written in a C subset, subject to high integrity computing certification processes, and standards. List of SQLLite exploits, https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html https://www.cvedetails.com/vulnerability-list/vendor_id-9237...
- josephg 4y agoI love C and Rust - I’ve been using rust full time for the past couple of years. But if I wanted to let loose these days and write some code without worrying about the safety that rust has to offer, I’d reach for Zig. It seems to solve a lot of C’s problems while being a much cleaner, well thought through language for low level code. Im a fan!