Hacker News new | ask | show | jobs
by SoylentOrange 1570 days ago
I would stay away from writing any program in C unless it is absolutely 100% necessary for your use case. For example, if you’re working on a large existing C code base like the Linux kernel.

There are much better modern alternatives to get comparable speed for new projects. Many projects that used to be written in C are being rewritten in either C++ or Rust for better memory safety and reasoning about the memory model.

Disclaimer: I did my PhD (several years ago) in a systems and networking lab and most of the code I wrote was in C. Now for example modern kernel modules tend to be written in Rust if possible, while such an option was not available while I was working there

1 comments

And when using C++, for 99% of the use cases it is perfectly fine to leave bounds checking and iterator validation enabled in release code as well.