Rust vs C++

Sdílet
Vložit
  • čas přidán 4. 06. 2024
  • Thank you to Kventis for fact checking the script: github.com/ImKventis
    Leo's Github: github.com/ProtogenDelta
    Discord: / discord
    Github: github.com/conaticus
    Twitter: / conaticus
    Join this channel to get access to perks:
    / @conaticus
    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
  • Věda a technologie

Komentáře • 301

  • @aniketbisht2823
    @aniketbisht2823 Před 4 měsíci +113

    C++ is not an OOP language. Its a multi-paradigm language which lets you develop Object oriented systems. You can mix and match various paradigms to solve your problem as it seems fit. It doesn't force you to follow a certain methodology. For example : in OOP languages like Smalltalk and Java, everything is an Object which certainly not the case with C++.

    • @kasufert
      @kasufert Před 3 měsíci +3

      If the C++ committee wanted us to do FP they wouldnt have made us type out S-T-D-Colon-Colon-Function every time we want to pass a function.

    • @jasonfevang9670
      @jasonfevang9670 Před 3 měsíci +2

      I’m mostly with you, however the standards committee is trying. Newer versions of C++ are introducing much more convenient functional-programming style features. See std::ranges and improved lambda support with the auto keyword.
      They can’t change older versions of C++ or remove features, so adding new features is all they can do, and they’re doing it

    • @aniketbisht2823
      @aniketbisht2823 Před 3 měsíci

      @@kasufert No, just use auto with appropriate invocable concept and you're all set. For E.g. : void process(std::invocable auto func) { .... }
      the process function takes an invocable that accepts a string_view and returns an int.

    • @kasufert
      @kasufert Před 3 měsíci +2

      @@aniketbisht2823 C# only requires Func or Action for a function variable, or x => f(x) for a lambda. I’m not saying C++ doesn’t have those features but the syntax is quite cumbersome.

    • @aniketbisht2823
      @aniketbisht2823 Před 3 měsíci +2

      ​@@kasufert That's just the standard version. You can also define your own concepts which are much more specialized and compact (less verbose). C++ lambda expressions are only slightly more verbose than C# because more things need to be accounted for like captures, template parameters, attributes etc. If you want one-liner lambda expressions, a widely used library to do that is Boost.Lambda2.

  • @mattvolpe1492
    @mattvolpe1492 Před 5 měsíci +73

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

  • @nebularzz
    @nebularzz Před 5 měsíci +107

    The Rust compiler praises the developer and the Rust developer praises the compiler
    Not with c++ though they hate eachother

    • @riigel
      @riigel Před 5 měsíci +1

    • @0xfadead
      @0xfadead Před 5 měsíci +10

      Unless your fighting with the borrow checker.

    • @nebularzz
      @nebularzz Před 4 měsíci +10

      ​@@0xfadead Just listen to the borrow checker and watch everything go well with your program

    • @48_subhambanerjee22
      @48_subhambanerjee22 Před 2 měsíci +6

      Bruh ..... Just write a Memory safe c++ code... Which is less verbose than your newcommer language...

    • @yokunjon
      @yokunjon Před měsícem +1

      @@0xfadead Times I fight with borrow checker is not that much. Though in fairness, I've been programming rust since 2020.

  • @the_fl3dd0x
    @the_fl3dd0x Před 5 měsíci +45

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

  • @aboliguu1168
    @aboliguu1168 Před 5 měsíci +104

    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++

    • @skyline00069
      @skyline00069 Před 5 měsíci +7

      "Serious"? Same thing goes for rust, although I agree with your point about the "infinite resources"

    • @aboliguu1168
      @aboliguu1168 Před 5 měsíci +34

      @@skyline00069 yeah, with the full meaning of the word ”serious”. Here are some places where C++ is the language of choise: operating systems (even though c is still used in the kernel), game engines, games (unity is the only platform place where language other than C++ builds AAA games), cars, aviation, space, ai, robotics, audio, databases, etc etc etc. Rust can do these things but C++ is still the ”industry standard” in real world and performance critical applications, so basically in everything else than webdev and enterprise code aka java.
      So i think that can be summarized as ”basically everything serious is written in c++”, you don’t see cars driving around with rust running in the drive computer.

    • @marshpin
      @marshpin Před 5 měsíci

      @@aboliguu1168 Why do you think that is? Rust is a newer language, and it only recently started getting backed by mozilla, while C++ is a really old language that most companies have been using for years, even decades on end that wouldn't benefit from switching to Rust.

    • @stefanplusplus917
      @stefanplusplus917 Před 5 měsíci

      @@aboliguu1168 not yet, hihi

    • @thecloudrazor
      @thecloudrazor Před 5 měsíci +5

      Spot on! I also agree with you on this. It'd be better for a beginner to thorougly learn C++ first and switch to Rust afterwards.

  • @SomeRandomPiggo
    @SomeRandomPiggo Před 5 měsíci +242

    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

    • @KrXYT
      @KrXYT Před 5 měsíci +19

      C++ will lose to Tha Rust Propaganda

    • @dmitriidemenev5258
      @dmitriidemenev5258 Před 5 měsíci +63

      Other languages simply didn't offer what C and C++ did in terms of low level control. Rust does and does it better.

    • @kasufert
      @kasufert Před 5 měsíci +76

      The Ottoman Empire will never be replaced, in the past 500 years so many countries have risen and fallen, but the Ottomans have really stood the test of time

    • @breadiusloafus5068
      @breadiusloafus5068 Před 5 měsíci +1

      I think C/C++ will be replaced when all of the children of people here watching this video die of old age or AI takes over all the programmers's jobs. But, seriously, Cobol is still being used widely.

    • @plaintext7288
      @plaintext7288 Před 5 měsíci +11

      ​@@kasufertChina, Egypt (and others I cannot remember) have been along for thousands of years, while other countries have risen and fallen.

  • @exoticlol
    @exoticlol Před 5 měsíci +23

    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.

    • @conaticus
      @conaticus  Před 5 měsíci +6

      Yeah I was way too drunk to be socialising or programming 😂

  • @aerosoftware
    @aerosoftware Před 5 měsíci +13

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

  • @adamduda7077
    @adamduda7077 Před 5 měsíci +49

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

  • @mathieucayeux
    @mathieucayeux Před 5 měsíci +20

    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 !

  • @aniketbisht2823
    @aniketbisht2823 Před 4 měsíci +12

    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).

    • @irrelevantgaymer6195
      @irrelevantgaymer6195 Před 3 měsíci +4

      You do not understand unsafe in Rust. Unsafe does not defeat the purpose of rust’s memory safety. All of Rust’s smart pointers use unsafe under the hood. The idea of unsafe is to write code where you handle “unsafe” operations and wrap it in a safe way so that when you call the function or block, the user can use it safely. By itself, you can’t do memory unsafe things with Box or RefCell or Rc because the “unsafeness” was abstracted away.
      Also readability is subjective and a function of experience. If you code a lot in a language, idiomatic solutions are very readable to you in that language.

    • @aniketbisht2823
      @aniketbisht2823 Před 3 měsíci

      ​@@irrelevantgaymer6195 I never said unsafe Rust defeat the purpose of Rust's memory safety. In fact, that's the whole point I am making, unsafe Rust is tedious. If you want performance you have to write low-level code catered to your specific needs and then wrap it in nice zero-cost abstractions for application programmers to use and make it generic without giving up functionality or performance. Both C++ and Rust have good feature for providing abstractions (C++ even more so). But when it comes to writing low-level code, in Rust you have to jump through several hoops which makes it tedious to write whereas in case of C++ it's just C which is just simple as it gets. When you are solving a hard low level problem, things should be as hard as they fundamentally hard not more. Rust gets in your way (even while writing unsafe Rust) and makes it harder and more complex than it needs to be.

    • @Heater-v1.0.0
      @Heater-v1.0.0 Před 2 měsíci +6

      On discovering Rust and evaluating it for up and coming projects I rewrote quite a few of my not so big C/C++ projects and libs into Rust. Performance turned out to be similar, sometimes slower sometimes faster. No, I did not use "unsafe" anywhere.
      As for those run time checks. There is only array bounds checks as far as I know. Oh and arithmetic overflow checks in debug builds. Often they are optimised away by virtue of the compiler having more information about what your code does. Often they are a vanishingly small part of execution time. Either way they seem to have negligible effect on performance. I have lots of number crunching code that operates on arrays to demo that.
      So no, there is no problem with Rust for writing low level code. You are only speculating that having not tried it or measured it.

  • @virusblitz
    @virusblitz Před 5 měsíci +2

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

  • @tiagocerqueira9459
    @tiagocerqueira9459 Před 3 měsíci +3

    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.

  • @Josh-kw7zk
    @Josh-kw7zk Před 5 měsíci +10

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

    • @maervo4179
      @maervo4179 Před 28 dny

      Actually it is really fast, in most cases even faster than code in c++ because the c++ developer has no clue what he is doing 😂🤣

  • @madhavgoyal6093
    @madhavgoyal6093 Před 5 měsíci +1

    This video got uploaded just when I needed it

  • @saadmuhammad3119
    @saadmuhammad3119 Před 4 měsíci +21

    Forget C++ or Rust just learn C.

    • @48_subhambanerjee22
      @48_subhambanerjee22 Před 2 měsíci +3

      If you know c++... You can easily learn c

    • @sankalppatidar4975
      @sankalppatidar4975 Před měsícem +3

      forget C learn assembly

    • @TannerJ07
      @TannerJ07 Před 28 dny

      @@sankalppatidar4975 Assembly? Real programmers use pure binary

    • @Mpython
      @Mpython Před 28 dny

      @@sankalppatidar4975 forget all language and back to the stone age

    • @KanashimiMusic
      @KanashimiMusic Před 21 dnem

      I had this exact mindset for quite a while, however, since I'm mainly coming from object oriented languages like Java and C#, I always felt like C's type system was lacking some things. Mind you, I'm not one of those people who think OOP is the solution to everything and bloat their program with an excessive amount of classes for things that don't really need them. I like the simplicity that C's type system has, but for me personally, I think it's just missing some things.
      I was hoping that C++ would solve that problem for me, but the moment I tried to make a simple C struct and C++ literally prevented me from doing very basic things with it that are possible in C, I dropped the language immediately and went back to C.
      Then I decided to give Rust a shot, and imo it's a perfect middle ground. Its type system allows for very simple things in the way C does (if you just want a small, basic struct that you want to be able to copy around, just give it the Copy trait and the borrow checker will leave you alone, SOMETHING THAT EVEN C++ WAS NOT CAPABLE OF FOR ME), but also has more advanced features like Traits (which are similar to interfaces). Tagged unions are also a built-in feature (kinda misleadingly named "enums", though they CAN be used as regular enums as well) which is really powerful.

  • @kamertonaudiophileplayer847

    Your video inspired me to write a blog on the topic, thanks a lot, great job.

  • @whoopsimsorry2546
    @whoopsimsorry2546 Před 5 měsíci +1

    Thank you for getting it right this time. I respect that.

  • @siman211
    @siman211 Před 5 měsíci

    any video courses you can recommend for c++? for beginners?

    • @DigitalCanineGames_
      @DigitalCanineGames_ Před 5 měsíci

      there's tons, just type C++ tutorial for beginners on youtube and you'll find a 10 hr long tutorial

  • @sillygaby_
    @sillygaby_ Před 12 hodinami

    using camel case in c++ must be considered a war crime fr

  • @guilherme5094
    @guilherme5094 Před 4 měsíci +10

    Bjarne Stroustrup's sacred word has already been written, many false prophets have already tried to kill his message, and many will still try, but C++ resists!
    (This is just a joke guys, but yes, C++ is still better option).

    • @yokunjon
      @yokunjon Před měsícem +1

      There are no "better" tools, there are trade-offs. Some tools are better in some jobs than others.

    • @shabadrandhawa3829
      @shabadrandhawa3829 Před měsícem +2

      @@yokunjon I agree.Use rust where it makes sense and use c++ where it makes sense.Same for any other language.

  • @cultoftranquility9616
    @cultoftranquility9616 Před 4 měsíci +4

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

  • @xD-saleem
    @xD-saleem Před 28 dny

    can i get the background music please.

  • @tabbytobias2167
    @tabbytobias2167 Před 5 měsíci +1

    y not just do what nim did? (but without indentation cuz screw that) make high level code compile to c++, and add option to write c++ for control. 🤔

  • @marcs8325
    @marcs8325 Před 16 dny

    My personal opinion (as a C# dev who looked at Rust, Go and C++): it seems to be much easier to write cross platform programs with Rust and Go.
    C++ has Boost, which helps a lot, but I had to compile it statically before linking to my statically build hello world program. The result was pretty good, but I had a Boost directory containing 10gb of data just to accomplish a simple task in a cross platform manner (create process lol).
    In Go and Rust this is much easier and quicker.
    Anyways... I'm not very experienced with C++, last time I seriously worked with it is 20 years ago. But the tooling seems a lot harder.
    Sure, I could do it without Boost, but then I'd have to write my C++ code for each OS separately with preprocessor if statements.
    PS I'm using Go now 😅 It gets out of my way and is fast enough. My main goal was to use something that's more efficient than C# (in size, memory usage and startup time).

  • @GD-L80
    @GD-L80 Před 10 dny

    Rust is the future of programming languages for low-level applications. And it could also have a say in other areas such as the Web, for example in conjunction with WebAssembly.

  • @yokunjon
    @yokunjon Před měsícem +1

    Amethyst is long dead, bevy holds the torch (and fyrox ofc, though its community is way small compared to bevy even though codebases are in similar size). There are lots of small frameworks or engine agnostic libraries that one can use for their own framework.

  • @SaifAli96
    @SaifAli96 Před 16 dny

    Rust and Rust's memory safety and management is inspired from C++'s RAII.

  • @HyperFocusMarshmallow
    @HyperFocusMarshmallow Před 2 měsíci

    4:45 “a lot of people enjoy this approach”, referring to “doing more work to link packages correctly”.
    Is this a serious argument that I’m not getting. Is there some example of a benefit?
    I do get that for someone who knows that approach it is just a part of life, but would you recommend that to someone picking up programming tomorrow?

  • @florianlang9266
    @florianlang9266 Před 4 měsíci

    It can be a funny video to try the QUICK protocol. I don’t have a idea what project you can do. But I think it’s interesting

  • @diadetediotedio6918
    @diadetediotedio6918 Před 5 měsíci

    Just use whatever you want, I don't think it ever had any point on this discussions.
    Obviously it does not mean the discussions in are pointless, in fact it is pretty needed because security 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.

  • @SamualN
    @SamualN Před 5 měsíci +3

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

  • @cron3x
    @cron3x Před 5 měsíci +3

    What are your thougts on Zig, is it worth learning?

    • @riigel
      @riigel Před 5 měsíci +1

      imo, learn it, then you would know if its really worth it..
      but if you're choosing what to learn first, I'd say:
      C ➡ C++ ➡ Rust ➡ Go ➡ Zig

    • @antoine8611
      @antoine8611 Před 5 měsíci

      Every language is worth learning if it really is the best choice for a project, even if only for learning different ways code can be written. If you already know languages that allow you to get work done, I suggest spending time mastering those instead of learning another you might never use. I would also advise you to ask about Zig to Zig experts, not Rust ones haha.

    • @HoloTheDrunk
      @HoloTheDrunk Před 4 měsíci

      @@riigel I was told before learning Rust that "if you know Rust, you don't really have a reason to use Go" by a friend who learned and used Go for years before learning Rust, so I'm not entirely convinced

    • @riigel
      @riigel Před 4 měsíci +1

      @@HoloTheDrunk well thats really up to, on my case, I also know rust first but there are few jobs open for rust than Go, so I learned Go for my full time job then rust for my personal projects and building up my portfolio for future rust jobs.

  • @Menschnr1
    @Menschnr1 Před 5 měsíci

    Which computing languages should i learn to be a pro in cyber security and cloud hacking?

    • @skorp5677
      @skorp5677 Před 5 měsíci +4

      Security is a field for which you need years of experience. There are no languages one can learn to easily be proficient. It would be C and probably some bash though.

    • @kerojey4442
      @kerojey4442 Před 4 měsíci

      Learn how assembly work and maybe some C

    • @zekiz774
      @zekiz774 Před 2 měsíci

      It doesn't really matter with which language you start.

    • @laffta6727
      @laffta6727 Před 8 dny

      nikkiinit CZcamsr says learn python, linux and sql--cyber mentor CZcamsr says to learn javascript and python--hmmm good luck

  • @christianremboldt1557
    @christianremboldt1557 Před 5 měsíci +19

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

    • @LinuxPlayer9
      @LinuxPlayer9 Před 5 měsíci

      real

    • @personator
      @personator Před 3 měsíci

      tbf if you don't need control over memory there's not much reason to use c++ or rust

    • @christianremboldt1557
      @christianremboldt1557 Před 3 měsíci

      @@personator I don't need full control over memory. That's why I prefer Rust over C. Rust is memory safe without relying on a garbage collector

  • @adamduda7077
    @adamduda7077 Před 5 měsíci +13

    C++ team:

  • @obiaboimmanuel8729
    @obiaboimmanuel8729 Před 5 měsíci

    For more clarifications please, Rust was announced 2010 and got stabled 2015

  • @AvidiaNirvana
    @AvidiaNirvana Před 4 měsíci

    I'm new to this, what exactly do you mean by memory safety issues? Can the code damage your RAM or ROM?

    • @mikedesanta4612
      @mikedesanta4612 Před 3 měsíci +2

      A simple app can take gigabytes of RAM, if bad coded.

    • @toparamennoodles9652
      @toparamennoodles9652 Před 3 měsíci +2

      Memory usage can keep going up until it eventually crashes your program.

    • @Heater-v1.0.0
      @Heater-v1.0.0 Před 2 měsíci +1

      I suggest you spend a decade working in C and C++. Or even assembly language. Then you will understand what memory safety is all about and which you had not wasted a decade of your life.

    • @yokunjon
      @yokunjon Před měsícem +1

      @mikedesanta4612, @@toparamennoodles9652 What you are describing is "memory leak", which is a memory bug, but less impactful in sense of "safety". Memory leaks can cause OS to shut your program or cause DDOS attacks, using your server's resources; but that's the limit of damage they can do. On the other hand, there are other memory related bugs that have much serious issues. Like accessing a donkey expecting a whale, trying to get 21. donkey out of 20 donkeys, trying to ride a donkey that is already being riden or trying to ride non-existent donkey. These are dangerous because they can corrupt data, or worst, cause remote code execution.

  • @ulrich-tonmoy
    @ulrich-tonmoy Před 5 měsíci +2

    Currently Rust would be best choice for servers where you cant/dont want to use gc lang else C++ specially For game dev C++ is the overlord for highend graphics

  • @4wb
    @4wb Před 5 měsíci +9

    i already watched this didnt i

    • @adamduda7077
      @adamduda7077 Před 5 měsíci

      Me too...

    • @tabbytobias2167
      @tabbytobias2167 Před 5 měsíci

      same :|

    • @j0of
      @j0of Před 5 měsíci

      pretty sure this is a reupload, not sure why tho

    • @Kventis
      @Kventis Před 5 měsíci +3

      Yeah, its a re-visit with improved points

    • @i6Hx
      @i6Hx Před 5 měsíci +2

      The Jesus frame got removed

  • @carpye2774
    @carpye2774 Před 5 měsíci

    I love your channel

  • @not_herobrine3752
    @not_herobrine3752 Před 5 měsíci

    your discord invite link seems to be invalid, mind updating it?

  • @MrAbrazildo
    @MrAbrazildo Před 5 měsíci +1

    6:38, to me, if I have flexibility, I have everything! (theoretically)

  • @prawnydagrate
    @prawnydagrate Před 5 měsíci

    didnt this video come out like 2 weeks ago

  • @ggtooez
    @ggtooez Před 5 měsíci +3

    Which language to learn? Both, if you have the time. They are really not that different. Once I rewrote quite a complicated project from Rust to C++ in 4 days.
    Which language to use? Depends on the use case, and what coding style you're most comfortable with.
    You glossed other linking and library management, also cross-platform development. Rust makes it trivial to develop for (and on) several platforms with nearly no extra effort. I write something on Linux for days, and then it just compiles on my Windows machine no problem.

  • @7A7z
    @7A7z Před měsícem

    hmm what if i learn both what should i do first ?

    • @user-hk2ol7en8i
      @user-hk2ol7en8i Před měsícem

      You can learn both at the same time. They are pretty similar imo

    • @7A7z
      @7A7z Před měsícem

      @@user-hk2ol7en8i sir yes sir

  • @nerdastics3987
    @nerdastics3987 Před 4 měsíci +1

    c++ while annoying is rewarding and challenging. Other languages, well.... is easy >= aneurysm?
    but also c++ is probably the most flexible language there is.

  • @fabiodefilippo9009
    @fabiodefilippo9009 Před 4 měsíci +4

    Jesus C++hrist

  • @hamzarashid7579
    @hamzarashid7579 Před měsícem

    C++ Countless features. You got me there

  • @TheSeiris
    @TheSeiris Před měsícem

    The only realistic benefits to pull developers to rust was supposedly faster build time. In fact, c++ build time is said to be generally faster, which is already strike out. If c++ 20’s module system works out and unfolds greatly, I think theres no hope for rust in future. As theres no reason to move.

  • @darkmagic543
    @darkmagic543 Před 5 měsíci

    Wait what Rust being the best choice for general purpose programming with its few areas where it is used?

    • @conaticus
      @conaticus  Před 5 měsíci +6

      While it has a smaller community, it is still used in a wide range of areas. I didn't list all of them but only the most common.

    • @HoloTheDrunk
      @HoloTheDrunk Před 4 měsíci +3

      Having used Rust in a variety of both professional and hobby contexts over the years (e.g. web servers, an OpenGL-based game engine, games, TUI applications, HPC, etc...), it's really nice for most things in my experience yes.

    • @darkmagic543
      @darkmagic543 Před 4 měsíci

      @@conaticusI don't know, based on the job market, rust has use cases in 2 areas: Crypto and networking (Servers, services, APIs).
      I am not sure if you mean by general purpose programming that you tachnically can use it for anything - then yes, but you could say the same thing about Java, but in reality neither of these languages are really used in that wide range of areas.

    • @zekiz774
      @zekiz774 Před 2 měsíci +1

      ​@@darkmagic543I'm not into programming for the money so I don't care.
      Also Rust is in the Linux Kernel and Microsoft is slowly rewriting parts of Windows in Rust. Also new Android features mostly utilize Rust.

    • @darkmagic543
      @darkmagic543 Před 2 měsíci

      ​@@zekiz774 It's not about the money but what is actually used in the industry. Sure, these companies may use it for some parts of their OS (although I don't know about Microsoft), but that is not really what one can realistically expect to get into and it is rather a minority. I think that was one of its intended use cases - writing operating systems and web browsers before it went sideways, so if you are creating something in that area it may be a decent pick

  • @XMaTRiX95
    @XMaTRiX95 Před měsícem

    if you want to be in control of everything because that's why you put in the hours studying to be a good programmer, use C
    else

  • @Kventis
    @Kventis Před 5 měsíci +3

    The impossible match-up

  • @comalab2387
    @comalab2387 Před 2 dny

    i think its lovely of you to acknowledge that c++, a language thats been used excessively for 40 years, is "fully capable" :')

  • @nossir
    @nossir Před 29 dny

    Any resources for me to learn rust? I've been youtubing but the ones i found are a million hours long (i don't have that time unfortunately and i need to make a compiler and i really want to use it and not C) with... a HUGE LOT of info, talk about spending more than 7 minutes explaining what data types are on a PowerPoint presentation instead of teaching how things work on the surface and leave me to search on my own (which i find more productive to me)

  • @ILightWas
    @ILightWas Před měsícem +1

    4:09 hard truths with humor 🤣🤣

  • @zactron1997
    @zactron1997 Před měsícem +1

    If I'm working alone, maybe I'd prefer C++ if I was more experienced with it. But working in a team? Rust hands down. No matter how talented the people you work with are, eventually someone will screw up, and the amount they screw up is only limited by the tools they use.
    In C++, your ability to stumble into a catastrophic design flaw is substantially higher than in Rust. The worst case scenario in Rust is a slow piece of code, or something that refuses to compile. I'll take that over an accidental Heartbleed any day of the week.
    It's not the 90's anymore, your little video transcoding library that doesn't need to be memory safe is now a pivotal piece of software running every video website on Earth. The consequences of insecure code are so much greater than they ever were. Honestly no different than speed limits. Sure, *you* might think you're able to drive faster than the limit safely, and emergency vehicles get to be an exception, but that doesn't change the fact that speeding kills.

  • @rishavgaming8662
    @rishavgaming8662 Před 4 měsíci

    In my opinion c++ should improve on error detected with g++ and gcc complier and c++ should include most optimise code in c++23 such math_23 something like that

  • @yep9817
    @yep9817 Před 3 měsíci

    The problem with C++ is people who say they know it, dont know it enough to write a code faster than Rust, even though language itself allows it.
    C++ is gonna be the next Assembly

  • @mgs_4k198
    @mgs_4k198 Před 3 měsíci

    PHP also has traits

  • @idedary
    @idedary Před 5 měsíci +27

    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 have become better programmer in the last 2 years of using Rust than I would have became 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.

    • @lesarXD
      @lesarXD Před 2 měsíci +2

      agree with most point but "objectively better in my opinion" is just not it

    • @dad8102
      @dad8102 Před měsícem

      But but but it’s slower 😢

  • @hydradragonantivirus
    @hydradragonantivirus Před 4 měsíci

    I developing an ClamAV community project on C/C++ instead of Rust.

  • @haliszekeriyaozkok4851
    @haliszekeriyaozkok4851 Před 5 měsíci +3

    It's a very good summary for all languages. Rust is way more better in my case because it's more easy to setup and deploy, that things in c++ is a nightmare.

  • @beatsengineer
    @beatsengineer Před 4 měsíci +2

    c++ is legend!!

  • @Erarnitox
    @Erarnitox Před 3 měsíci

    I feel like Rust is just C++ where you limit yourself to only use unique pointers for anything that is heap / dynamically allocated. Is that far off?

    • @irrelevantgaymer6195
      @irrelevantgaymer6195 Před 3 měsíci +1

      Rust also has references which is what you use most of the time. Smart pointers allow you to essentially create a reference with added functionality, sometimes that added functionality is allocating the data on the heap. You would use smart pointers for the same reasons you’d use them in C++, to abstract away some of the memory handling to make it easier to reason about your code. And there is more to rust, so you’re not far off, just wholly incomplete

  • @H3cJP
    @H3cJP Před 5 měsíci +1

    6:29 would had been funny if you ended there

    • @conaticus
      @conaticus  Před 5 měsíci

      after hours of editing it was very tempting 😂

  • @evandrofilipe1526
    @evandrofilipe1526 Před 3 měsíci

    0:41 TRAITS ARE NOT UNIQUE TO RUST
    Anyway, continue

  • @FriedMonkey362
    @FriedMonkey362 Před 3 měsíci

    Just learn c# it is something completely different, its not the best at anything specific but it is pretty good for every task all around

  • @ninjaasmoke
    @ninjaasmoke Před 4 měsíci

    my problem with rust is i feel like im being force fed good food. ik its for my own good, i just don’t like it.

  • @danwellington3571
    @danwellington3571 Před 5 měsíci +3

    Something I will always hold over every other language is that both the Linux kernel and Tor have adopted Rust
    Both are projects that have to be perfect because if they aren't then people die
    Until Linux adopts a third language and/or ditches Rust, I'm gonna be a smug bitch about it

  • @AetherSerenity
    @AetherSerenity Před měsícem

    i love rust & java as a c++ programmer (i got forced to say that)

  • @roiqk
    @roiqk Před 5 měsíci

    Ive already seen this vid????

  • @Talel_kraiem
    @Talel_kraiem Před 2 měsíci

    That intro 😂😂😂😂

  • @bogdannn846
    @bogdannn846 Před 20 dny

    Traits are unique to the language - not really. Haskell and Scala have them too, probably others as well

  • @ddystopia8091
    @ddystopia8091 Před 4 měsíci

    Pistachio flew in to spread misinformation

  • @thepigcat76
    @thepigcat76 Před 5 měsíci +6

    Tbh traits are not entirely unique to rust. They are pretty much interfaces from java/c#/go with fancy typing on top

    • @v01d_r34l1ty
      @v01d_r34l1ty Před 5 měsíci +6

      Technically speaking, you can create interfaces in C++ too with virtual abstract member functions.

    • @diadetediotedio6918
      @diadetediotedio6918 Před 5 měsíci +6

      Nah, not exactly. They are closer to type classes than to interfaces, at least if you consider interfaces as they where originally designed in Java/C#.

    • @phoneywheeze9959
      @phoneywheeze9959 Před 5 měsíci

      even php has traits

    • @crimsonmegumin
      @crimsonmegumin Před 5 měsíci +4

      Rust Traits are way more powerful. You can impl a trait for a external type, you can impl a trait for a generic, you can add specific constraints for a impl, you can have associated constants, you can have associated types, you can have generics in associated types, you can have constraints in associated types. If I would pick an example, it would be Haskell's classes, though I'm not sure if it has all Traits' features (you can have HKT in Traits, but it's syntax is kind of weird and there is not std Trait for that)

  • @Norstator
    @Norstator Před 3 měsíci +1

    I want to believe the Rust hype but it is not easy.

  • @MrRobertosoto
    @MrRobertosoto Před měsícem

    Rust !!!

  • @pa3kc376
    @pa3kc376 Před 5 měsíci

    Equally as entertaining as video before this one...

  • @RichardLofty
    @RichardLofty Před 5 měsíci +3

    Zig is better than both of them.
    And even while still not even being 1.0

    • @crimsonmegumin
      @crimsonmegumin Před 5 měsíci

      What Zig has that Rust doesn't have? I know Zig has a cool macro system...

    • @ciso
      @ciso Před 5 měsíci +2

      ​@@crimsonmeguminZig has no macros and is focusing more on replacing C.

    • @crimsonmegumin
      @crimsonmegumin Před 5 měsíci +3

      @@ciso Sorry, I used the wrong term. "Comptime expression evaluation"

    • @HoloTheDrunk
      @HoloTheDrunk Před 4 měsíci +1

      Different use cases. Very cool project and I hope it ends up being used everywhere, but I wouldn't use it everywhere I use Rust (or C++ for that matter)

    • @ciso
      @ciso Před 4 měsíci

      @@crimsonmegumin No problem :)

  • @RafaelMilewski
    @RafaelMilewski Před 5 měsíci +8

    Rust is superior, but just a note C++ is not a superset of c for a long time...

    • @egg-mv7ef
      @egg-mv7ef Před 5 měsíci +4

      rust is very much not superior

    • @RafaelMilewski
      @RafaelMilewski Před 5 měsíci +6

      What is superior than rust for you?

  • @naterupard552
    @naterupard552 Před 5 měsíci +2

    normally i’d it’s impossible to “kill” a language, but it really does seem like the Rust community is hellbent on killing C++. I’ve tried learning C++ three times (i’m still a novice) and the first two times i just got an instant headache, even after learning Java.

    • @devon9374
      @devon9374 Před 5 měsíci +1

      Damn lol, what gave you the headache?

  • @minneelyyyy8923
    @minneelyyyy8923 Před 5 měsíci +1

    traits are not unique to rust im upset and angry >:(

  • @alurma
    @alurma Před 4 měsíci +1

    First of all, thanks for improving the video. It's still misleading in many ways though.
    > C++ is object oriented
    C++ is multiparadigm.
    > Rust uses trait system which is unique to the language
    It's not unique to the language. E.g. Haskell type classes are similar to traits.
    > Rust effective at preventing memory leaks
    I don't see how Rust helps against memory leaks how C++ doesn't.
    > .clone overuse
    C++ is no different
    > C++ is also known for great backwards compatibility
    Rust is the same with editions.
    > Rust has good interop with C
    C++ is the same. It's true that Rust can't easily interop with C++, which is a good point.

  • @juicyfruitman6318
    @juicyfruitman6318 Před měsícem

    Yeah I played rust...

  • @hwstar9416
    @hwstar9416 Před měsícem

    C++ is *NOT* a superset of C. there's tons of C features not in C++

  • @zhornz
    @zhornz Před měsícem

    if you want to make a ddos tool, ill suggest you use rust.

  • @julesoscar8921
    @julesoscar8921 Před 4 měsíci +1

    Rust is better in evey way, except inheritance and dynamic linking

    • @lesarXD
      @lesarXD Před 2 měsíci

      composition >>> inheritance anyway

  • @arta6183
    @arta6183 Před 5 měsíci +1

    traits are not unique to rust; they also exist in Haskell... Haskell works exactly the same way as rust.

  • @samansamani4477
    @samansamani4477 Před měsícem

    "unless you are looking for a job"... Stop bullying us man ☹️

  • @Faraday2122
    @Faraday2122 Před 5 měsíci +1

    FIRSTTTT, also love the content

  • @fabiocoimbra2218
    @fabiocoimbra2218 Před měsícem +1

    I prefer C/C++ because I'd like to control the system memory. I know that sometimes other languages has garbage collection and it helps but for small resource of hardware C++ is the winner

  • @SunPodder
    @SunPodder Před měsícem

    If you're coding hardware, use C (not c++). Else use go.

  • @gast128
    @gast128 Před měsícem

    With modern C++ you also have pretty much safe code but it isn't enforced by the compiler. C++ only lacks an extended standard library which is its biggest drawback compared to other environments (e.g. Java; C#).

  • @vasealis
    @vasealis Před 20 dny

    Java all the way, simply the best!

  • @jabuci
    @jabuci Před 4 měsíci

    Neither, of course.

  • @KanashimiMusic
    @KanashimiMusic Před 21 dnem

    Honestly, everybody is talking about C++'s "flexibility" meanwhile I can't do basic things in it like making a small C-like struct that I can just copy around (something that I can easily do in Rust by having the struct derive the Clone and Copy traits which are then implemented automatically). Someone please riddle me that.

    • @testtest-qm7cj
      @testtest-qm7cj Před 16 dny

      Simply make a C-struct within your C++ code and use it accordingly would satisfy your requirement. You can freely memcpy() such an object without any problem. It is how all those blazingly fast game engines deal with their performance critical data. What's wrong with that? C++ is a *multi-paradigm* language, and mix&matching C style code, OOP, generic programming, functional programming, and more is the whole point of C++ in the first place. It seems you're under the impression that you have to confine yourself within OOP to use C++ properly, which is NOT.
      Moreover, what you wanted is even described in C++ standard; "TrivialType", which is one of the C++ named requirements, has been explicitly declared since C++11, could have been checked with std::is_trivial for the same amount of time.
      So, please do proper research before making such a harsh (and wrong) comment, next time.

  • @Ruben-un1mr
    @Ruben-un1mr Před 4 měsíci

    'Promo sm'

  • @vincentnthomas1
    @vincentnthomas1 Před měsícem

    2:38 sounds like a skill issue tbh

  • @Heater-v1.0.0
    @Heater-v1.0.0 Před 2 měsíci +1

    Its easy:
    If you value reliability in your software creations, if you value robustness, correctness and security, if you value good design with performance. In short if you take pride in the quality of your work, then use Rust.
    If you you don't care about any of those things and just churn out code for money then feel free to use C++.

    • @yokunjon
      @yokunjon Před měsícem +1

      Yeah *surely* would convince anyone, good job...