Rust vs C++

preview_player
Показать описание


Join this channel to get access to perks:

0:00 Intro
0:12 C++ Overview
0:30 Rust Overview
0:57 Memory Management & Safety
2:16 Difficulty
4:09 Performance
4:25 Community & Ecosystem
5:39 Use Cases
6:25 Conclusion
Рекомендации по теме
Комментарии
Автор

6:45 clearly this was a secret coded message to tell us to use Go

LagFlicks
Автор

Respect for improving the video after constructive feedback from your viewers. This sadly isn't a matter of cause anymore on YouTube. I think it's an amazing video now.
Greetings from Germany❤

the_flddx
Автор

The main reason why learning c++ is still the better option in my opinnion is that everyting serious is written in it, so you have infinite resources to learn software development straight from the source. For example, amd’s fsr3 is open source and written in c++, want to know how it works? Helps a lot if you know c++

aboliguu
Автор

C and C++ will never be replaced, in the past 30 years so many languages have risen and fallen, but C (especially) and C++ have really stood the test of time

SomeRandomPiggo
Автор

Thats way better ! You've improved a lot the quality of the video compared to the old one ! You took reasonable arguments from boths sides and it seems alltogether way less biased.

Bravo !

mathieucayeux
Автор

"In fact jesus himself used c++ whitch is probably the reason why he was crus-" that really got me 💀

adam_duda
Автор

Of all the points, I cannot agree that C++ is a better option for larger scale applications. When there are multiple people working on a project, it's so hard to keep track of reference lifetimes or multithreaded safety, and that's where Rust absolutely shines - it will hold your hand and tell you that your code is unsafe without digging into other people's code.

NotherPleb
Автор

4:19 The java virtual machine sometimes it's kinda wild lmao.

Josh-kwzk
Автор

Lockheed Martins F-35 runs on and uses C++
There are hundreds of thousands of jobs within C++

cultoftranquility
Автор

I love how you remade the video. Btw, I was in your drunk VC, but I was troublehsooting an issue with my mic, so I couldn't talk.

Edit: Remember when you were making something, and it wouldn't work, so you had to make a new project and start over? The problem was with your 'debug' script, it was attempting to run "/src/index.js" but you didn't have an src folder.

exoticlol
Автор

"Control over memory" for me only means "freedom to write more bugs"

christianremboldt
Автор

C++ Countless features. You got me there

hamzarashid
Автор

If you want to be a true backend developer, master both languages, C++ (especially latest standard) and Rust.

aerosoftware
Автор

Rust is not developer friendly. It is a nightmare to learn and use. I've learned and used dozens of languages over the past 40 years, and rust is by far the most difficult I've encountered. It's way more difficult than C++, and the syntax sucks.

I've just completed a small benchmark based on the prime sieve... C++ vs rust. Both using the same approach.

Results: execution time for primes to 10, 000, 000, 000 (code optimised for speed. CPU i7 12700)

MSVC C++: 27 sec (MFC GUI App)
Clang/LLVM C++: 30 sec (MFC GUI App)

MSVC C: 25 sec (terminal)
Rust: 29 sec (terminal)

The C++ implementation is a few hours work. Converting to rust, about 2 days' work. And for all of the MS bashing, MSVC came out on top, though not by much. This was just a fun exercise. I wouldn't read much into these figures, but I did expect rust to outperform.

toby
Автор

Nice! The video truly is much better after the remake, thanks for owning up to your mistakes and handeling critisism so well :)

virusblitz
Автор

2:11 It is explained in Rust docs, it is nature of reference counted smart pointers, especially in connection with pointers designed to be out of borrow-checker control by design (RefCell)
, it is well explained how to avoid this or use Weak<T> if you need cycles.
This only not freeing memory, technicaly it is leak (leaving less memory) but it could only lead to DoS.
This example is unfair, because it causes stack overflow but it happens because println! macro don't handle cycles of this kinds well and loops.
And many languages with such power (.toJSON ) have the same problem, because it is not simple or costless to avoid it.

AK-vxdy
Автор

0:24 well it's **nearly** a superset

SamualN
Автор

Just use whatever you want, I don't think it ever had any point on this discussions.

Obviously it does not mean <all> the discussions in <all contexts> are pointless, in fact it is pretty needed because security <is a problem> in software development, but for most people this does not matter most of the time. You should engage in these discussions when you are actually planning on making something that can affect peoples lives if it fails, and discuss why it is not more justified to use a language that is built to be safe instead of one associated with unsafety. People have good points on both sides, like static analyzers and the dont's of static analyzers, but the discussion does not make sense if you are making a game or a simple software, chill and make it wether in Rust or C++ or really anything at all.

diadetediotedio
Автор

Problem with Rust for writing low level code is that, not only you have to jump through several hoops to do what you want (get desired assembly with zero extra overhead) but the resulting code is very unreadable and also difficult to change. Readability and the ability to quickly change/iterate through multiple implementation strategies (with their own trade-offs) is crucial for writing performant low-level code. The language also enforce various runtime checks (which cannot be disabled at runtime like C++ asserts), so even if you strive hard to write correct code by using formal methods, testing it religiously etc, you would still be paying for them at the runtime or your code would be littered with unsafe blocks (which defeats the whole purpose while also making you code less readable).

aniketbisht
Автор

Learning C++ in 2024 is like learning Latin. You need to know it to work on existing projects and get a job. Learning Rust is for starting new generation of applications. Rust is objectively better than C++ in my opinion even though people say they have less freedom because of oppressing borrow checker. My counter argument to that is that it is just a strict mentor who forbids "bad" practices. I become a better programmer in the last 2 years of using Rust than I would have become in 20 years of not using it. It also makes collaboration more practical as you don't need to decipher your colleagues code, because it's "relatively" the same due to the rules. I see only benefits here.

idedary