Hello,
Is Rust-Lang a replacement for C\C++? I mean is that can most programs that written in C will rewritten in Rust-Lang in the future?
Thank you.
Hello,
Is Rust-Lang a replacement for C\C++? I mean is that can most programs that written in C will rewritten in Rust-Lang in the future?
Thank you.
lol, no. Don't believe everything 4chan tells you.
Devoted my life to programming...
Moved to tech board.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
It aims to be.
Can: yes. Will: no. C++ and especially C will stay relevant for a very long time.I mean is that can most programs that written in C will rewritten in Rust-Lang in the future?
If you're asking because you wonder if C and C++ are worth learning, then the answer is yes. The Rust ecosystem wins with web (backend) development because of the many libraries targeting that.
C was purposely created to replace an assembler (to be a CPU independent assembler level language) to write the UNIX operating system.Is Rust-Lang a replacement for C\C++?
Rust isn't targeting such a direction. It is not for use in place of an assembler for such purposes. You may find C used for other targets, sometimes where other languages might be a better fit. It is used at a higher level than assembler, but many of the fundamental constructs of C translate into 1 or 2 machine language instructions to a degree sufficient to target operating systems, device drivers and other related targets.
C++ was created to address a wide mixture of targets, raising the upper level features of the C language (through objects, libraries and other features), while retaining most (if not all) of C's "close to the metal" capabilities.
Several languages, including Rust, may well intend to target the upper application region where C++ is often used, but can't quite manage to do all that C++ does from one end of that spectrum to another.
For that matter, several languages have attempted the same, from Java and C# to Swift and others.
Where simplicity and rapid development are priorities, some of those languages, including Rust, attract considerable interest.
Consider, however, why. There is a practical point from a business perspective which promote language use like Java and C#. It allows business to trust lesser skilled programmers where the language "protects" them from "themselves", while allowing for rapid development of target projects.
There's nothing wrong with such a choice, but where ambitious target applications require a priority on performance, there is still nothing that can fully replace C++, especially considering the long history and wide library support available in C++.
As long as there are operating systems, there will be C. Linux, UNIX and Windows are written in C. By extension, that means Android (Linux) and Apple(UNIX) are, too.
That will not change. Some of that code base goes back decades.
In high end application development, most are built in C++. From Photoshop to 3DS Max, AutoCAD to Revit, most SQL engines and the best audio workstations, the largest and most competitive, most sought after by the market are built in C++.
Some of them have code bases going back decades.
In gaming, most engines are built in C++. Most physics engines are built in C++. Most audio engines are built in C++ or C.
Shear inertia would imply that if a language were to replace C++, it would have to overcome all that history, all the expertise, and the entire standing codebase upon which large corporations are built in order to motivate a transfer to another language.
At best, Rust could take advantage of an emerging niche where the timing was right.
PHP is a popular web-server side language. While there is a lot of PHP code, and libraries supporting that, there's good reason to believe other languages would offer vastly superior performance and return on investment if PHP were replaced.
Were languages have been lost, it is usually along that line, where something seriously superior appears and the legacy code is not that important to retain.
Even as a contender like Rust appears, it would also have to compete with the fact that C++ is evolving, and with some very powerful results. C++ is not a stagnant, vulnerable target like COBOL.
From a technical standpoint, the D programming language is in a better position to replace C++, and I'll bet you're asking yourself "what is D?"
Last edited by Niccolo; 08-14-2019 at 04:18 PM.
Everyone knows Java is the real C++ killer.
Soma *runs away*
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther
Yo!
How's university treating you this time around?
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther
Rust aims to be a C/C++ replacement, but it has a long way to go. There are a lot of legacy systems written in C/C++ that would cost too much time and money to be rewritten in Rust.
C/C++ are safe for the foreseeable, but it wouldn't hurt learning Rust, if you want to write experimental programs.
/g/ is sometimes right about things. In terms of Rust, it's a never-ending flame war, mostly fueled by childish transphobia.
Some food for thought...
A Rust-based TLS library outperformed OpenSSL in almost every category | ZDNet