News for hackers. Stuff that matters.
Re:Ask HN: What are some good resources to learn safety-crit... by wizofaus on Friday August 05, 2022 @04:08PM (#32361377)
"Memory safety is pretty easy to catch" - my experience over the last 18 months or so on a large C++ open source project says very much otherwise, almost every week a new NPE or core dump/access violation seems to leak into the codebase. These simply can't happen in many other languages and many now even have good support for non-optional references, ruling out entire classes of bugs that can suck up significant developer time to track down. And for long running systems memory leaks can also be a substantial cause of instability. If I were working on a safety critical system I'd actively push to avoid using C/C++ unless there really was no alternative. And yes modern OS kernels are pretty good evidence that it is possible to do but I'd suggest it requires exceptional programmers and some very rigorous processes to enforce.
Re:Ask HN: What are some good resources to learn safety-crit... by buescher on Friday August 05, 2022 @04:19PM (#32361503)
Assume you have a functional safety requirement for which a standard exists. What language implementation would you use that is certified for that standard?
Re:Ask HN: What are some good resources to learn safety-crit... by wizofaus on Friday August 05, 2022 @04:29PM (#32361609)
Not sure how that question can be meaningfully answered unless it's for a specific safety requirement/standard. Are you suggesting that for most standards that require certification, there are no compiler implementations certified except for C/C++ ones?
Re:Ask HN: What are some good resources to learn safety-crit... by buescher on Friday August 05, 2022 @04:32PM (#32361649)
Try the exercise. Choose one and then choose your tooling. If it's not C, C++, or Ada, I'll be surprised.
Re:Ask HN: What are some good resources to learn safety-crit... by wizofaus on Friday August 05, 2022 @05:25PM (#32362153)
I had some involvement with development of an air traffic management system, which was being written in Java, as that was certified for use in that field. As a language, I'd rather use C++ over Java, but if safety criticality were the priority, I'd choose Java every time. I haven't coded in Ada but unless there's something about it that's truly awful to work with, it seems a better choice than C/C++ from what I know about it.