|
|
|
|
|
by esFran
22 days ago
|
|
I've been thinking for a while about learning a programming language other than SQL and Python. I'm weighing three candidates: C, C++ (modern C++, with smart pointers and so on) or Rust, and I can't make up my mind. C is ideal because it would get me into the Linux world and make me 100% portable. But the threat Rust poses on the security front is significant. C++ is a real dark horse: almost all high-performance libraries are written in C++, as are critical pieces of software such as 3D engines, drone controllers and robotics. But the threat from Rust is still felt. I have to choose: what would you recommend? I think C++ could be the perfect fit, but it keeps me out of Linux kernel development. With LLMs, is the safety advantage of Rust's borrow checker mitigated? |
|
C++ is an extremely complex language with lots of features and libraries and mountains of code, but it's not necessarily easy to write or debug. Compiler warnings alone can be crazy, considering the templating feature is almost a compile-time turing complete language.
Rust has some (to me) ugly syntax, but it tries to avoid the footguns of C++ while maintaining its commitment to removing the classic C problems in safe code. It also tries to maintain "zero cost abstractions" that are easier to program, but don't impact execution speed, primarily by having a much smarter compiler than C or C++.
I'd learn Rust. C will be easy after that, and C++ may be unnecessary.