I’m not a programmer (or just a beginner one)
So just wanted to know if it is possible and will happen in the near future. Isn’t C/C++ decades old and has some good amount of limitations?
Does C/C++ have limitations? Not really. Rust has language features that make certain concepts easier to write, and the compiler is very protective, but all three languages can express (basically) the same things. C, may live forever because there are certain spaces where it is practically the only viable option.
Rust will definitely have to reach industry standard before it becomes an educational language. As Rust gets adoption in high-end infrastructure (AWS, Google Cloud, Meta, etc.) and the Linux kernel, education might start picking it up. Linux code doesn’t allow C++, only C, but is exploring Rust. This is a good sign for Rust.
I more or less agree with The Kaffe’s statement here, though I would like to add that, at least for the time being, rust has slightly lower execution speed, and a longer compile time.
The age of a programming language doesn’t really matter. Consider lisp ^^
I do use, and like, rust. It would work as an educational language, but not the educational language. Rust is actually far more limited than C or C++, in a very important sense: a much smaller subset of all possible programs are valid in rust. This is a real pain when learning about programming in general.
Rust is already being used at an industrial level, including in the “industry industry” sense of embedded computing, microcontrollers, etc. It’s niche, but I do expect it to grow over time. It’s unlikely to ever displace C/C++ completely, though - inertia, if nothing else. COBOL is still around, after all, and people who know it make a great deal of money.
Educational level? I don’t think so – most languages don’t have borrow checkers, and it’s not really an easy introduction. An interactive scripting language is probably better for teaching beginners, whereas C (or C++) can be used to teach about memory management and other hardware-related topics.
Industrial level? Not as a replacement, but certainly as another alternative. I don’t know how good the FFI is in Rust for C/C++, but I’d consider that essential considering the sheer quantity of libraries written in either of those languages.
I was a teaching assistant for intro classes to C and C++. I agree. I think C and C++ are good languages to learn about memory, python is good for beginners because they can easily translate their pseudo-code into execution quickly, without spending too much time fighting with the language. Borrow checking is definitely a hard concept, I think C++ references starts to exercise the purpose of borrow checking in other languages. Learning about pointers in C, and then references in C++, they’ll feel like the borrow system in Rust is the next evolution of memory management, no longer writing const everywhere.
I’m not that into rust… not that it’s bad necessarily, but I understand it Introduces it’s own set of limitations. like the strict memory features are great for some projects (like Firefox) but an inconvenience for some embedded stuff.
I use C++ and my dad is an advanced/professional embedded C++ programmer. Also hard to get something that is so compatible with C. Which C is the baseline especially in embedded projects which tend to ship with their own tool chains…
But I don’t really care since I will pivot to just about any language if the project is something I really want to contribute to. Or if it’s clear a component should be implemented in a given language.
So C++ does its job very well which is to be an advanced super set of C. I don’t see how Rust is going to ‘replace’ that in any time soon. If you are a beginner programmer then I would try to understand both and figure out which one is going to be more useful to you personally.
It’s unlikely that C/C++ are going to be replaced by anything anytime soon. While there are more modern options like Go (my personal choice) and Rust that try in their own different ways to prevent the many memory management bugs that often exist in C/C++ programs, sometimes, depending on what you’re doing, the methods they use can get in the way of writing the code. In those cases, C/C++ are always a very good choice and will continue to be widely used, likely for decades to come. Also, there is so much software written in C/C++ that even if it was being replaced, that process would itself take decades.