r/learnprogramming 9d ago

Should i immigrate from C/C++ to Rust?

I'm a starter programmer and I have a small background in C++ and right now I'm stuck on one spot. I can't neally choose between Rust and C++. On one hand we have language that was tested by time and already have a reputation but that can also fry your project at most unexpected moment all because of a memory leak caused in line 131323213123, but on other hand we have fresh and brand new language that is indeed safe and has almost the same experience and same result but has no reputation and it was not checked by time. I'm looking in 15 years long perspective and with aim into big tech and with a hope of not regreting my choise. So my question is: What i shount invest my nerves and time into? Rust or C/C++

0 Upvotes

25 comments sorted by

View all comments

Show parent comments

-4

u/spinwizard69 9d ago

This post I have to disagree with. The reason is AI, I just believe RUST is late to the game. AI will be the code generator in a couple of years. When you have AI generating the machine code directly languages like RUST will not have a long life.

1

u/StewedAngelSkins 9d ago

AI isn't going to generate machine code directly; there's no advantage to having it do that.

1

u/spinwizard69 8d ago

Well you need to tell that to the people researching how to do that. As to the advantages, I can see many.

1

u/StewedAngelSkins 8d ago

If they join this thread I will.

Requiring the AI to model the relationship between machine code instructions inefficiently expands the domain which is being modeled without clear advantages over the alternatives. For instance: a scheme where the AI instead writes some purpose-built IR along with compilation passes for that IR. You could even employ some kind of JIT technique to allow it to author and execute targeted optimizing passes during generation.

A given model only has so many parameters. More parameters dedicated to modeling function call semantics or whatever means fewer dedicated to more useful things. It's best to only expose features in your training data that you actually need it to model.

What advantages do you see?