|
Honestly, I might just jump in and learn Rust. I think it's a good place to start with memory management issues because you have to deal with it but good practice is enforced. C/C++ is the obvious alternative for that level of programming, but it's less constrained, which is better in some ways but bad in others. If you're wanting to learn Rust eventually, you might as well start there. If you're wanting to not start with the low-level memory management stuff, and want an introduction to programming per se, there's lots of options. One thing to think about is OCaml. It's a nice language, similar to Rust in some regards, and in fact Rust was originally written at least partially in OCaml, and for awhile was kind of discussed as a derivative of OCaml in some places. You'll get a mixed imperative-functional kind of introduction without going to quite as low of a level. Another approach is to to just learn a language. In that case I'd probably recommend Python (probably Python 3) or javascript, because there will be a ton of resources and the skills will directly transfer. If you're looking for something that's maybe more niche but "clean" you could try Julia or Nim. Julia's very numerics focused and is getting used in that area, but doesn't get used out of that, at least so far. Nim is very very niche but a good language, similar to Python but faster and cleaner and some ways. Another thing to think about is Scala, which might transfer to Rust in some ways better than the others (except OCaml). Honestly, though, I might just start with Rust. It will be heavy going at first, but I think learning the memory stuff is very very useful later. It depends, though. I think you have lots of good options. What's most important is to just dive into something that's interesting to you and start creating stuff, regardless of how small it is. A lot of concepts will transfer across languages. |
C++ is an archaeological dig of a language, which has about 4 major strata. It can be an entirely different language project to project, depending on how you use it. However, I suspect that a particular C++ style using smart pointers and RAII can be a good preparation for Rust. This is especially true if you can contrast that C++ style with some other woolier style of C programming.
If you want to be very knowledgeable, 1) write a compiler that produces machine code and 2) do some concurrency.
What's most important is to just dive into something that's interesting to you and start creating stuff, regardless of how small it is. A lot of concepts will transfer across languages.
The best advice by far.