The Good And Bad Of C++ As A Rust Dev

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 538

  • @Flynn-lk8im
    @Flynn-lk8im Месяц назад +624

    I'm a plumber, man I hate rust.

    • @Leonhart_93
      @Leonhart_93 Месяц назад +22

      It just gets everywhere where you least expect it 😂

    • @RustIsWinning
      @RustIsWinning Месяц назад +19

      I'm a crab, man I love Rust.

    • @AG-ur1lj
      @AG-ur1lj Месяц назад +10

      @@RustIsWinningI’m a crab man, I eat people

    • @Flynn-lk8im
      @Flynn-lk8im Месяц назад +11

      ​@@RustIsWinning Love them crabs, they go well seasoned with lemon juice, red chilli and a touch of Old Bay.

    • @liegon
      @liegon Месяц назад +6

      @@Leonhart_93 Yeah, it's coarse, and rough and irritating.

  • @einargs
    @einargs Месяц назад +173

    The creators of haskell are legit like "it's good we aren't popular because it means we can be experimental," which is true and based but also funny

    • @isodoubIet
      @isodoubIet Месяц назад +13

      Well the sad thing is they have just enough code that they _can't_ really fix things, so they have all the downsides of being weird with none of the upsides.

    • @KikkerFish
      @KikkerFish Месяц назад

      Haskell is what you get if you have a 160 IQ and 0 EQ.

  • @zwerko
    @zwerko Месяц назад +84

    The good thing about C++ is that if you massage it enough, you'll eventually get to run whatever you write in it on pretty much any hardware.
    The bad thing about C++ is that too many people will abuse that fact and massage-away...

    • @ITSecNEO
      @ITSecNEO Месяц назад +3

      Massage deez... 😂

    • @ferinzz
      @ferinzz Месяц назад +2

      Recently found out that it took 5 years of fighting to get embed added to the standard library.
      Despite years of proof showing that fopen fread could never match the speed of just adding the file as binary directly.

  • @thekwoka4707
    @thekwoka4707 Месяц назад +14

    Wow, those C++ error messages are quite clean compared to what any Django app throws

  • @defenestrated23
    @defenestrated23 Месяц назад +42

    I worked for Kitware. All the cmake maintainers agree the Cmake syntax is terrible, especially the legacy stuff. There have been a ton of overhauls to ergonomics but the old clunky abstractions are still all over tutorials everywhere. But well-written CMake actually mostly solves the "builds on my machine!" problem. I've also seen some of the most horrific abuse of CMake you could imagine.

    • @TheSulross
      @TheSulross Месяц назад +1

      There are some books on CMake but couple of the top titles I got I found are very lacking. The world still needs a best (modern) practices CMake book that covers enough real-world scenarios to be actually useful. Need a Scott Meyers kind of author for the subject of CMake. And should cover integrating git projects and C++ modules.

    • @isodoubIet
      @isodoubIet Месяц назад +4

      my conspiracy theory is that kitware intentionally keeps cmake terrible in order to sell the books written by their developers. Nothing else makes sense. The supposed overhauls actually make things worse, e.g. nobody with a brain in their head would've come up with generator expressions if they _actually_ were trying to improve things.

    • @MrAlanCristhian
      @MrAlanCristhian Месяц назад +3

      In almost every case of "this tool is horrible", there is a high chance that tool "was horrible" and people are learning from old tutorials and books. That's why people are rediscovering Postgres, PHP, OOP, unit testing, and so on.

    • @isodoubIet
      @isodoubIet Месяц назад

      @@MrAlanCristhian Not the case with CMake. CMake was horrible, and remains horrible, just in a slightly different way.

    • @danielbriones6171
      @danielbriones6171 Месяц назад

      Autotools is so much worse. It makes CMake look like the greatest build tool in comparison.

  • @noredine
    @noredine Месяц назад +71

    I'm a stainless steel fan

    • @rcoder01
      @rcoder01 Месяц назад +2

      What’s your cubic feet per min

  • @Jasonlhy
    @Jasonlhy Месяц назад +19

    I managed the CMake for 3 platforms, windows. Linux, emscripten. The header and link to library is crazy…so many places can go wrong. But it feels magic when code works

  • @xbmarx
    @xbmarx Месяц назад +219

    "I hate C++"
    "I haven't used C++ since high school"
    lmaaaaoooooo

    • @ITSecNEO
      @ITSecNEO Месяц назад +14

      And you think that any company uses anything newer than C++11? 💀
      Seriously, you are simply not allowed to use any of the newer features, it's the same subset of C++ no matter the version of C++. It's just not fun to work with C++ code and even less fun to write it yourself

    • @isodoubIet
      @isodoubIet Месяц назад +31

      @@ITSecNEO My company uses cpp20, will adopt 23 as soon as it's production ready what's your point

    • @ITSecNEO
      @ITSecNEO Месяц назад

      @@isodoubIet You think that's a good argument? 😂 Just use freaking google, C++11 is the most used version today. It's a fact. Your comment is non sense, you are the one exception. All other C++ devs aren't as lucky as you.
      And yeah, name your company here, I will check the truth of your comment. My guess is that you will refuse to name it ;)

    • @Folemaet
      @Folemaet Месяц назад +11

      @@ITSecNEO smart pointers are already novel and cool feature that is not available for some of us. *Cries in c++08*

    • @ITSecNEO
      @ITSecNEO Месяц назад +12

      @@Folemaet My prayers go to your poor soul.

  • @vt2788
    @vt2788 Месяц назад +11

    Rust is a pathway to many abilities some consider to be unnatural.

  • @Me-wi6ym
    @Me-wi6ym Месяц назад +48

    This comment section feels like a warzone. Am I the only one who just kinda likes both languages? Neither are perfect and both can be messy, but both can make pretty cool things too if you take some time to consider the design; you know, the same as all the other languages. This shouldn't be the part people are stuck on.

    • @9636dev
      @9636dev Месяц назад

      I agree, when writing C++ code tends to be more verbose, but for me the development velocity is a lot faster, but I do think about security a lot less, leading to many race conditions and sometimes memory leaks

    • @ITSecNEO
      @ITSecNEO Месяц назад

      No, C++ is messy by default. Every company has their own C++ subset or rules for programming and formatting. All the newer features which people often refer to in defense of C++, are not included in the subsets anyways. Just Google a bit and you will find out that the most used version in 2024 is still C++11. Just imagine what all those poor souls need to go through everyday.

    • @kr4bz
      @kr4bz Месяц назад +9

      I love the safety of rust, but I am frustrated that I can not move at the speed I can with C++ for rough ideas.
      EDIT:
      Also cargo is amazing

    • @isodoubIet
      @isodoubIet Месяц назад +13

      It's a warzone because Rust evangelists know their language can't win on the merits, so they need to use underhanded tactics like trying to poison the well or begging regulatory bodies. cpp developers in turn are obviously not pleased about having their livelihood attacked in this way.

    • @PizzasBear
      @PizzasBear Месяц назад

      To the guillotine!

  • @DeerDesigner
    @DeerDesigner Месяц назад +68

    Why do people complain about using Arc in rust and then the same people run first to say how great C++ is and how you should use shared_ptr when it’s the same thing?
    EDIT: and unique_ptr, which is just Box - same story. And then those people run to say how nice inheritance is and how you can hold std::vector, but they throw up when you mention Vec

    • @defeqel6537
      @defeqel6537 Месяц назад +11

      If you actually have ownership (edit: transfer), then *_ptr may be valid, but it's not really required very often. Littering your code with shared_ptr is a great way to make your code slow(ish). That whole vector is an architectural mistake in anything that is not a hobby project, and is a very Rusty thing to do

    • @cherloire7978
      @cherloire7978 Месяц назад

      @@defeqel6537 whats the alternative?

    • @Vendetta405
      @Vendetta405 Месяц назад +10

      Please avoid using std::vector in production code. It's likely better to use something like std::vector and handle runtime dispatch without a virtual table, possibly using enums within the data. Combining a contiguous memory container like a vector with random memory references from smart pointers negates the advantages of cache-friendly access patterns, potentially giving you the worst of both worlds. In well-structured C++ codebases, patterns like this are rarely seen.

    • @DeerDesigner
      @DeerDesigner Месяц назад +12

      Well, it’s your lucky day because in production rust codebases such patterns are rarely seen as well! I’m commenting on the fact that in this very video and in many corners of the internet people are constantly praising using *_ptr in C++ while those same people complain about using stuff like Arc in Rust. You can’t have it both ways. Rust simply forces you to think consciously about who’s owning the data and for how long. The concept is the same regardless whether you’re writing Rust, C, C++, or any other language

    • @defeqel6537
      @defeqel6537 Месяц назад

      @@Vendetta405 indeed, it's basically just a worse list at that point

  • @fotnite_
    @fotnite_ Месяц назад +20

    I think they're both good languages. Honestly, the biggest problem with C++ right now is that good learning materials are more difficult to access. Both languages have quite a bit of weird bullshit you need to remember to keep things performant, but its usually easier to figure out what the weird bullshit is in Rust.
    That, and the build system, but honestly I've just stuck with Meson and been satisfied with it for C++.

    • @ITSecNEO
      @ITSecNEO Месяц назад +1

      @@fotnite_ So are you working on projects alone? Most of C++ devs can't choose the build system, we are forced to use whatever the company we work for uses. And good luck if you ever change the company again, it's likely that they are using a different subset of C++ and also a different way of building the code.

    • @computernerd8157
      @computernerd8157 Месяц назад +1

      It also does does not help that tutorials will merge C code woth C++ so a noob gets confused.

    • @Kwazzaaap
      @Kwazzaaap Месяц назад +10

      The problem of C++ is that no matter how many courses you take, the first real C++ codebase you see will use like 20 features you've never seen and be tripled down in some god forsaken macro system with a build system that requires a case study of its own. I have yet to see a fully comprehensive resource that prepares you for that. Instead you have to claw each bit of understanding from existing code and no matter how good you become that doesn't stop your predecessors from violating the geneva convention with cmake.

    • @ferinzz
      @ferinzz Месяц назад +4

      ​@@Kwazzaaapmaybe trying to figure out the unreal codebase?
      Part of why i gave up on unreal is because the c++ side of things is so poorly documented.

    • @Kwazzaaap
      @Kwazzaaap Месяц назад +3

      ​@@ferinzz I had UE in mind while writing that, yes. But it's fairly common elsewhere too.

  • @MRodzor
    @MRodzor Месяц назад +9

    I'm not sure if this message/ comment will reach you but. Thank you, thank you for being you, thank you for discussing so many topics. Honestly bro, you're a real inspiration and you've made me approach so many different aspects of life when it comes to the mentality of work and code that I can't say how much I appreciate these videos. You rock bro!

  • @lancemax857
    @lancemax857 Месяц назад +41

    Coming from golang, when I first worked c++ it baffles me that there are 3 group of errors that's needed to be figured out when building.
    Preprocessing, syntax and linking.
    I almost punched my monitor when the same linking errors showed despite the changes on cmake.

    • @ITSecNEO
      @ITSecNEO Месяц назад +12

      @@lancemax857 The whole build system is annoying. It's so annoying that the same errors are displayed multiple times in the build log. It's also annoying that we have to use external build tools in the first place. If you switch companies they likely have a whole different build system which you need to learn. Its like we need to learn multiple new languages just to build the C++ code. One general build system would be the best

    • @patrickkdev
      @patrickkdev Месяц назад

      Golang gives me peace of mind

    • @theairaccumulator7144
      @theairaccumulator7144 Месяц назад

      I mean, Rust has more build steps but they're all hidden from the developer. I'd say that's worse if you care about what's actually happening when you build your program. If you don't care there are example cmake configs that can hide everything the same way.

    • @ITSecNEO
      @ITSecNEO Месяц назад

      @@theairaccumulator7144 Cam you please stop defending CMake. PLEASE xD It's a trauma for every C or C++ dev and you defend it like it's some premium tool ._.

    • @theseangle
      @theseangle Месяц назад

      ​@@theairaccumulator7144you raise a good point, didn't even think of it that way

  • @Tekapeel
    @Tekapeel Месяц назад +51

    Can anyone explain the OOP is not for games thing? The only way OOP has ever made any sense as a useful construct to me is in gamedev analogies

    • @adam7802
      @adam7802 Месяц назад +5

      +1 I am curious about this too.

    • @adali228
      @adali228 Месяц назад +30

      For larger or more complex games it generally has worse performance than something like ECS, but it's perfectly fine to use for the vast majority of non-AAA games.

    • @RoyaltyInTraining.
      @RoyaltyInTraining. Месяц назад

      Having objects / structs which combine data and code is universally considered a good thing. But most people take the term "OOP" to also imply using inheritance, which often leads game developers to dead ends. Game development massively favors composition. Basically that means instead of having "Enemy", "MovingEnemy", and "ShootingMovingEnemy" classes which inherit from one another, you have one "Enemy" component, one "AIMovement" component, and one "AIShooting" component, which you can plug into the objects in your game.
      In case you want an example of how inheritance leads to dead ends: Imagine you want something in your game that moves and shoots, but isn't considered an enemy. Then you would have to duplicate that entire branch of inheritance when using OOP, but with composition you could just use those two components without any extra work.

    • @hanifarroisimukhlis5989
      @hanifarroisimukhlis5989 Месяц назад +14

      Easy answer: Lifetimes. Traditional lifetime of data is from first use until last use, but in games you need to "kill" objects without dangling reference.

    • @ClimateChangeDoesntBargain
      @ClimateChangeDoesntBargain Месяц назад +22

      OOP is bad for max performance, you want to do some data oriented design which benefits from less pointer hops and cache friendliness

  • @Cryptic0013
    @Cryptic0013 Месяц назад +6

    As a game dev, the biggest pro of C++ is that I have to use it, but the biggest con of C++ is that I have to use it.

    • @rusi6219
      @rusi6219 Месяц назад +1

      Ye but game dev is tedious with any language as much as I dislike C++ your work would be tedious with anything else as well, it's just the nature of the systems you're building

    • @Cryptic0013
      @Cryptic0013 Месяц назад

      @@rusi6219 You're not wrong, but I did find C# less headache-inducing. Something about the structure of C++ makes my brain cell sad and wish it had company.

  • @tobyuuuuu
    @tobyuuuuu Месяц назад +3

    I use CPM for package management with CMake. It is very straightforward to use.
    Don‘t use a lot of dependencies though.

  • @Macciejable
    @Macciejable Месяц назад +5

    Fun fact, you can spell "I'm a rust dev and a bit of evangelist", just "I'm a rust dev" without changing the meaning. :)

  • @PizzasBear
    @PizzasBear Месяц назад +2

    In Go every function is implicitly async, where `select` and `

  • @Jemalloc
    @Jemalloc Месяц назад +17

    Rust have more videos on RUclips than actual production code, everyone one trying to sell you Rust otherwise would be dead, and another thing really strange about rust is the brainwash on people about rewriting everything in rust, rust have it’s use cases as any other language, there is not a single language efficient and good for everything

    • @ionaerofeeff
      @ionaerofeeff Месяц назад +6

      I think it's that Rust somehow absorbs your desire to write code in it, due to how satisfying and easy it is to write and build, respectively. It has a simpler-to-understand package system than python, and great portability which is enhanced by community packages. It's fun, I guess.
      And at that point it can be tempting to write things in Rust for the goal of both learning Rust even better and becoming more familiar with a certain algorithm or procedure, as the whole process can be smoother-feeling than a number of other languages with generally pretty-good performance across the board. And as the video covers, it helps to eliminate a lot of footguns present in other languages by making it difficult to write some of the riskier or error-prone code, ESPECIALLY if you use an LSP. Clippy helps this yet more, as it highlights not just errors but potentially confusing or suboptimal parts of code, and (almost?) always for an understandable reason.
      That being said, you still get a lot of the freedom in Rust that you do in other languages.
      Which isn't to say that people SHOULD be doing that, just that it has a lot about it which encourages it. I do agree that people should widen their scope when looking for the right tool for the job.

    • @Jemalloc
      @Jemalloc Месяц назад +2

      @@ionaerofeeff 🧢

    • @ionaerofeeff
      @ionaerofeeff Месяц назад +4

      @@Jemalloc What do you disagree with

    • @Jemalloc
      @Jemalloc Месяц назад +1

      @@ionaerofeeff wrong emoji sorry 👍

    • @theairaccumulator7144
      @theairaccumulator7144 Месяц назад

      @@ionaerofeeff Rust is great for systems programming which is what it was originally designed for where correctness stands above all else. It's horrible for webdev or especially gamedev where development and iteration speed are way more important than correctness. In the time a Rust backend dev spent refactoring his entire codebase to add 1 simple feature, the Typescript dev added 20 more. In the time a Rust gamedev spent refactoring his entire codebase to implement 1 idea, the C++ gamedev came up with 20 new ideas, implemented them, tested them, selected out the good ones and made the code good. Of course if you're writing an operating system where a small memory issue could cause a critical RCE vulnerability Rust is important, but in webdev and gamedev putting out trash fast and polishing it along the way is the only way to actually make progress.

  • @zeragon7
    @zeragon7 Месяц назад +5

    The Cherno mentioned! Let's go!

  • @typethedeveloper
    @typethedeveloper Месяц назад +13

    Bro these comments are wild 💀

  • @Jasonlhy
    @Jasonlhy Месяц назад +3

    Sometime things just are not designed to fit your use cases perfectly, you just have to write your own solution

  • @nuvotion-live
    @nuvotion-live Месяц назад +4

    I spent 4 years writing my app in Typescript, React, and WebGL. Now I'm rewriting it in C++!

    • @winrid
      @winrid Месяц назад

      Are you using oat++?

    • @nuvotion-live
      @nuvotion-live Месяц назад

      @@winrid OpenFrameworks and ImGui

    • @theairaccumulator7144
      @theairaccumulator7144 Месяц назад

      Why? Unless you're switching from webapp to native which is sort of reasonable.

  • @lazyh0rse
    @lazyh0rse Месяц назад +2

    There are two types of people, those who deploy buggy code to production due to "temporary placeholders for debugging" vs those who use debugger to debug the code without changing it.
    On a serious note, please use debuggers, they will change your life.

  • @epixru
    @epixru Месяц назад +39

    The stock market is just a graph of rich people's feelings.

    • @alst4817
      @alst4817 Месяц назад +2

      Preach

    • @Cannon952
      @Cannon952 Месяц назад

      you keep posting the same comment on several videos

    • @rusi6219
      @rusi6219 Месяц назад +2

      ​@@Cannon952no problem there. People need to hear this. Also interest bad.

    • @bzboii
      @bzboii Месяц назад

      mostly robots

  • @Doomsdayparade
    @Doomsdayparade Месяц назад +3

    Can't stop me from using both, though I'm using mainly C++ atm

    • @ITSecNEO
      @ITSecNEO Месяц назад +1

      @@Doomsdayparade That's why I pray for you

  • @framebuffers
    @framebuffers Месяц назад

    Props to the brother to teach her younger sister to program straight to C++. That's such a kickstart on any young one's carreer, that I wish both of them rha absolute best.

  • @Parker8752
    @Parker8752 24 дня назад

    When it comes to package management for build systems, I personally reckon there's a balance. To use rust as an example, I would ideally want to use crates while I'm getting things working, and then work on removing those dependencies which can be easily removed, and fixing the others to a specific version (which can be later updated as necessary), for the simple reason that all else being equal, fewer dependencies is probably better.
    Of course, one particularly nice thing about Cargo is that you can specify where a given dependency should be drawn from, making vendoring easier to accomplish regardless.

  • @replikvltyoutube3727
    @replikvltyoutube3727 Месяц назад +6

    C++ has good error messages, you just need a C1 level knowledge to read them.

    • @ITSecNEO
      @ITSecNEO Месяц назад

      @@replikvltyoutube3727 "Segfault" is a very good error message indeed xd

  • @excitedbox5705
    @excitedbox5705 Месяц назад +2

    Setting up dev environments should not be so complicated that entire businesses are built around making it easier for EXPERTS. As a noob you can spend days fixing compiler and linker paths alone for fully functional examples you download to compile.

  • @TheGiladklos
    @TheGiladklos Месяц назад +2

    C++ is great for job security. Im the only one at my job that can understand the templated mess I wrote.

  • @pixelsupreme6824
    @pixelsupreme6824 25 дней назад +1

    As a professional C++ dev myself it just hurts to see everybody treating OOP and inheritance hierarchy as the same thing.

  • @75hilmar
    @75hilmar Месяц назад +1

    I know neither really but I can imagine once you have the better part of Rust under your belt you can imagine where C++ might go wrong and catch bugs before they happen. Also OOP in games is really good because you have classes of stuff, classes of weapons, characters damage and what not.

  • @DynamicalisBlue
    @DynamicalisBlue 29 дней назад

    OOP was designed to be close to how you visualise relations in real-life. It can be very annoying but most games do represent real-life so it kinda works well.
    That being said, unless you're game is going to be a very realistic simulation, it's still going to have its problems.
    Personally, I'm huge fan of data-oriented ECS. It does have a learning curve but it's amazing. The main problem however, is trying to get the game designers (and even some of the programmers) to adjust to it.
    A lot of the ECS systems on my project aren't as good as we want them to be just because the design team still wants some degree of control over them while using their existing OOP workflow. However, recently, performance has been a concern so we have essentially been given the green light to prioritise it over the designers' feelings. Can't wait.

  • @MikkoRantalainen
    @MikkoRantalainen Месяц назад +3

    I'm a software developer but when I'm fixing my car, I sure hate rust.

  • @CaleMcCollough
    @CaleMcCollough Месяц назад +2

    ROTFL!!!😂😂😂😭😭😭 This is why I made my C++ API Script2 the way I did. I replaced the C++ standard library and removed all the legacy code and we have a much better debug experience without the weird errors. Script2 is great for standard game dev style using data oriented programming or pseudo OOP, which is not not OOP but it can be a substitute for OOP. Script2's all contiguous memory design has many benefits for games like undo and stack AI/ML hybrids. Building in Script2 is crazy easy because we use a single translation unit, so you don't need CMake, it just compiles so fast that you just build the code.

  • @JohnnyThund3r
    @JohnnyThund3r Месяц назад +1

    Yeah... 100%, Object Oriented programing really just makes sense for Games. I can easily understand why Torvalds hates the stuff working with hardware drivers at the kernel level, but making games in Godot, it really just makes sense to abstract things out with Classes... I too hate how unclear OOP can be to read and mostly would prefer to not use it where I can, however when projects get as big as a modern game, dealing with the mess that is Classes is preferable to dealing with the mess that is ~5000 exposed global functions in large part because it lets you move fast and break things.

  • @NoX-512
    @NoX-512 Месяц назад +3

    Building C and C++ projects is easy. You just write a shell script invoking the compiler and all the cmake complexity is avoided.

    • @kodirovsshik
      @kodirovsshik Месяц назад

      I personally like gnu make. For me it's like shell script (that I used to do), but a little more convenient

    • @charactername263
      @charactername263 Месяц назад

      That is what CMake is.

  • @user-hk3ej4hk7m
    @user-hk3ej4hk7m Месяц назад +1

    git submodules are much easier to work with since `git rm`, `git mv` and other operations now let you treat them as regular directories.

  • @Awesomer5696
    @Awesomer5696 Месяц назад

    ginger bill was right about package managers being bad, but only in languages like odin that actually define what a package is and dont drown you with linking and header include path bs.
    In odin you can literally just git clone a repo into your project, and start using it from other files, its great.

  • @cryptonative
    @cryptonative Месяц назад +2

    Rust has a debugger that works with vscode. The issue is that it does not work with default settings so have to figure it out yourself.

    • @cryptonative
      @cryptonative Месяц назад

      @@Testvvjnb-ci3zl works fine for a vanilla project, I found issues with multiple rust projects in the same vscode workspace and setting the debugger up for rust tests, these two things require messing up with the debugger config

  • @KikkerFish
    @KikkerFish Месяц назад +2

    Rust ppl: “don’t use unsafe! 😡”
    Also Rust ppl: “lets download 4000 unvetted crates for my todo app”
    It’s like juggling chainsaws with safety glasses.

  • @theIbraDev
    @theIbraDev Месяц назад +4

    Excited for prime to finally set up dap....... And then still only do print debugging LUL

  • @furuthebat
    @furuthebat Месяц назад +2

    And here I'm waiting for reflections and modules in modern C++ ... I heard zig is good.

  • @JoshJu
    @JoshJu Месяц назад

    IMO, Rust compiler has the best error diagnosis and suggestions among all programming languages.
    Those helpful error messages and cargo clippy suggestions contribute significantly to dev experience, without which Rust would be very painful to use given the complexity of borrow checker and lifetime mechanism.

  • @yassinesafraoui
    @yassinesafraoui Месяц назад +3

    @TheCherno mentioned

  • @Evilanious
    @Evilanious Месяц назад +11

    This has been my experience with c++. I have unrestrained freedom to do things that make sense to me. For me that's been enough to be happy with it.
    But the buildsystem and the build-buildsystem-system (which is what CMake actually is) is a bit of a pain in the ass. Integrating libraries into a project is not easy either.
    Compared to Rust or Java everything is just a little harder to do, until you want to do something like making your own linked list or some other thing that the rust devs deem unsafe or bad coding, where it is a complete pain to do in rust (or java) and in c++ it remains at the same level of 'not ideal but doable'.

    • @ilmuoui
      @ilmuoui Месяц назад +2

      If only there was a Rust crate for linked lists...

    • @ClimateChangeDoesntBargain
      @ClimateChangeDoesntBargain Месяц назад

      @@ilmuoui if dependencies are a pain you try do implement it yourself first 😀

    • @fotnite_
      @fotnite_ Месяц назад +1

      ​@@ilmuouiI'm pretty sure there's a linked list in std::collections, but also I've never used linked lists in actual code since the exact class where I learned about them in college.

    • @ITSecNEO
      @ITSecNEO Месяц назад

      @@fotnite_ That's likely not true, a lot of other data structures are based on linked lists. They are used everywhere :) But yes, other than college or for learning algorithms, no one needs to implement a linked list from scratch.

  • @bitwisedevs469
    @bitwisedevs469 Месяц назад

    Git submodule is hard at first but really powerful if use for the purpose of making modularize feature.

  • @erastvandoren
    @erastvandoren Месяц назад +2

    Templates are great. I miss them in Java

  • @chrismdavis2009
    @chrismdavis2009 Месяц назад

    To your point about the Star Wars droids- it is already known the droids were made with cheap parts so they could make more of them, hence the reason they suck at shooting and always seem half baked.
    The idea was quantity over quality

  • @decky1990
    @decky1990 Месяц назад

    FetchContent is a thing in CMake - managing dependencies isn't overly painful.

  • @Lightja_
    @Lightja_ Месяц назад

    great editor.

  • @moonasha
    @moonasha Месяц назад +5

    I don't know how anyone could approach a serious game with complex systems without using OOP. Like I literally can't wrap my head around it. I'm 99% certain you'd be hard pressed to find any real AA / AAA level game that doesn't use OOP

    • @_ClericalError_
      @_ClericalError_ Месяц назад

      @moonasha You might be surprised. OOP is not as common in software that needs to be highly efficient or squeeze the maximum performance out, the abstractions themselves are far from zero cost, but especially the way that objects get laid out and processed in memory is particularly poor for performance.
      As one AAA example that I know something about, Skyrim is as far as I know written in C++ but the actual important parts of the game is implemented as a huge number of tables.
      There is no class for weapons with subclasses for each type, there are itemdef table entries with an integer that encodes the type of item, if it's a weapon what type of weapon it is, etc etc.
      The mod tools for editing any of the lower level data for the game is basically the interface for editing a 20GiB database, it's just thousands upon thousands of tables of columnar data. A bunch of arrays, in other words.

    • @WotJOfficial
      @WotJOfficial Месяц назад

      the creator of Roller Coaster Tycoon would like a word with you
      but yea, im right there with you. creating and managing game objects without OOP sounds like a nightmare in itself. genuinely curious about it, might look up some code for games written in non-OOP languages to see how they did it. its likely heavy usage of structs and arrays or array-adjacents.

    • @8bitbug420
      @8bitbug420 Месяц назад

      @@WotJOfficial Yeah oop is great, even better with fp

  • @athf226
    @athf226 Месяц назад +1

    Git submodules are great for FPGA stuff.

  • @MasterHigure
    @MasterHigure Месяц назад

    I'm not an expert, but I don't think you *can* make a linker error in a conventional rust build. Everything is compiled from source in your project, so all the stuff that could go wrong at linking is checked before it even compiles.

  • @maximofernandez196
    @maximofernandez196 Месяц назад

    The fact that prime uses printf debugging makes me feel better as someone who's just lazy enough to not setup the debugger for nvim

  • @pastasawce
    @pastasawce Месяц назад +1

    I think mambo number 5 came out the same year as turok 2 btw

  • @Nors2Ka
    @Nors2Ka Месяц назад +1

    I took a peek at the code and that guy should absolutely be banned from talking about programming on the internet.

  • @leshommesdupilly
    @leshommesdupilly Месяц назад +33

    Virgin Rust dev has to point out to the compiler that part of his code is unsafe because he doesn’t know what he do
    Chad c++ programer has no unsafe code because he has no skill issues and has deep understanding of his hardware. Uses crazy shortcuts and memory tricks to achieve maximum performance. Compiler blindly trust the superior intellect of the human brain

    • @RoyaltyInTraining.
      @RoyaltyInTraining. Месяц назад +9

      And then you find out that the compiler would have optimized things better on 90% of platforms if you had just written five lines of boring high level code

    • @hanifarroisimukhlis5989
      @hanifarroisimukhlis5989 Месяц назад +15

      And then the "chad" c++ program segfault with a coin flip.

    • @ITSecNEO
      @ITSecNEO Месяц назад +3

      @@leshommesdupilly "No unsafe code" in a language which is entirely memory unsafe 💀 That must be the biggest L take I saw in a while. 19 likes for this tells us everything about this community too

    • @antifa_communist
      @antifa_communist Месяц назад +1

      Is this satire?

    • @ionaerofeeff
      @ionaerofeeff Месяц назад +1

      Using an unsafe block implies that the programmer, does, in fact, know better than the compiler. Which isn't to say they are right, but if you can do it in C++ why not Rust? The path may be different but the destination is the same.

  • @doublekamui
    @doublekamui Месяц назад

    c++ is well tested and modern c++ for very complex app, F35 fighter jet is programmed using c++. F22 raptor is programmed using ADA. there is no fighter jet (app that obviously very very very complex) that programmed in rust yet :v

  • @MrWorshipMe
    @MrWorshipMe Месяц назад

    You just either use unique pointers in vectors (for large data), or indices instead of references if the data type is trivial or very small. But yeah, the fact that C++ doesn't tell you about it is a problem.

  • @chigozie123
    @chigozie123 Месяц назад

    It's like everyone and their sister who programs in C++ have simply given up on finding a good build system for C++, and instead find solace in telling each other that nothing good exists for managing dependencies.

  •  Месяц назад

    Non-C++/C engineers that not every language enables you to vendor dependency so easy. There's to not just bundle every dependency.

  • @aquilafasciata5781
    @aquilafasciata5781 Месяц назад

    I think the web is predominate because that is the most available job listing imo

    • @doublekamui
      @doublekamui Месяц назад +1

      yes because because every company needs official web meanwhile not every company needs game or android app or dekstop software or cli or operating system or kernel

  • @snikta564
    @snikta564 15 дней назад

    The good thing with C++ is that you can implement basically any paradigm. This is also why C++ sucks.

  • @toby9999
    @toby9999 Месяц назад +4

    Nothing comes close to MS Visual studio's debugging features. That's where Linux sucks. No decent IDE for C++. Actually, no decent IDE for any of languages I've tried. Your complaints about vectors and realication etc. That's just bad programming. A skill issue.

    • @winrid
      @winrid Месяц назад +2

      even compared to CLion?

    • @Alex-hy7nx
      @Alex-hy7nx Месяц назад +1

      What do you mean, there are IDE that work on Linux for every
      C/C++ - Clion or Qt IDE
      Rust - Rustrover or VSCode
      Go - VsCode or Goland
      Java - Intellij
      Python - VSCode or Pycharm
      Kotlin - Intellij

    • @fullaccess2645
      @fullaccess2645 Месяц назад

      in linux you just use gdb from terminal and call it a day.

    • @kodirovsshik
      @kodirovsshik Месяц назад

      ​@@fullaccess2645well that's the point - it gets the job done, but is way less handy, especially for bigger projects

    • @charactername263
      @charactername263 Месяц назад

      @@fullaccess2645 gdb always gets the job done, it just works. It got to the point that I do all my C++ work in MinGW and debug with gdb because Visual Studio just sucks balls at developing for any platform other than Windows.

  • @isaacalves6846
    @isaacalves6846 Месяц назад +62

    Meanwhile, C can't stop winning.

  • @Quantris
    @Quantris Месяц назад +6

    maybe a hot take but I lose a little respect for any software engineer that identifies themselves based on what language they use

    • @wolfgangrohringer820
      @wolfgangrohringer820 Месяц назад +1

      One of my hobbies is photography. It's similar to photographers who identify themselves based on what camera brand they use. Online discussions on this topic are also similar to programming language flamewars.

  • @dforj9212
    @dforj9212 Месяц назад

    The "package management" bit is a case study in favor of Nix

  • @Heater-v1.0.0
    @Heater-v1.0.0 Месяц назад +9

    My problem with the likes of CMake is that it is a ton of ugly syntax and semantics just to build something which I simply don't want to learn, life is too short for that. In the same way I don't really want to learn all the intimate details of the processor instruction sets I target, that is why we have high level languages is it not. Meanwhile C++ has grown into a ridiculously complex, twisted and ugly language,. while never fixing the problems of the C from which it grew.

    • @isodoubIet
      @isodoubIet Месяц назад +1

      Cmake is a horribly designed mess from beginning to end. They tried to improve things with "modern" cmake but the "targets and usage requirements graph" model is instantly shown to be the colander of leaky abstractions when used on a real project, and things like "generator expressions" flatly shouldn't exist.

    • @wolfgangrohringer820
      @wolfgangrohringer820 Месяц назад

      @@isodoubIet On top, one usually doesn't get to choose "which" CMake to use, old-school or declarative. Depending on the libraries you want to pull in, you end up having to deal with the whole depth of it anyways.

    • @isodoubIet
      @isodoubIet Месяц назад

      @@wolfgangrohringer820 yep, and even being "modern" is no guarantee of it makign sense. One example is libtorch -- they somehow list as their "usage requirements" that you must embed debug symbols in the binary. And there's no way to override it because cmake is awful in every way.

  • @Slashx92
    @Slashx92 Месяц назад

    "OOP is not for games" screams chat, while unity is almost exclusively oop and even godot if you take into consideration that everything is a scene that has nodes in it with components inside. Everything is an object.
    If at least two of the most used engines do it, is not like it's a sin

  • @weakspirit_
    @weakspirit_ Месяц назад +1

    that little sister is such a chad

  • @AlucardNoir
    @AlucardNoir Месяц назад

    Firstly, having so many C++ rules that the integer goes back to Zero, ouch. Secondly, you do realize that Palpatine was the one behind the droid army as well right? There was no need to send a programmer undercover, Count Doku could have just waved his hand and told the programmers working on the code to make sure the aiming code was bad and they'd do it without even realizing it. They'd probably go insane trying to find out why it was so bad all the time making sure it staid that way and never be any the wiser.

  • @snikta564
    @snikta564 15 дней назад

    Hasn't there been debugger support for Rust in vscode since almost day one?

  • @jesse9999999
    @jesse9999999 Месяц назад

    is it not better that git pull doesn't update submodules considering what you said about submodules locking the version of the dependency to your commit? the --recursive flag for git pull feels like pretty good design to me

  • @ferdynandkiepski5026
    @ferdynandkiepski5026 Месяц назад +2

    The debugger in neovim is called gdb and lldb. Just use the terminal. A lot of the pain with cmake comes from it's documentation being useless. It has no examples at all. There are so many ways to make things work, and you aren't pointed to them.

  • @gregf3021
    @gregf3021 Месяц назад

    To the spider problem, this is why man invented shot guns. I hate those things. I would rather be stuck in a cave with a bear.

  • @aniketbisht2823
    @aniketbisht2823 Месяц назад +1

    His sister is the real CHAD.

  • @issacwessing4945
    @issacwessing4945 Месяц назад

    80%+ of learning c++ for me is package management and cmake. Oh my fucking god i wish these were better. Maybe theres a reason for them being like this but i dont even understand them well enough to see it

    • @kodirovsshik
      @kodirovsshik Месяц назад

      If you are learning cmake, you are not learning c++, you are learning cmake, no?

  • @Hellbending
    @Hellbending Месяц назад

    Needed to free() the AbstractMi croPlasticsCreatorSpiderFactory man

  • @leshommesdupilly
    @leshommesdupilly Месяц назад +24

    Rust dev cannot teach you rust without selling you rust

    • @RustIsWinning
      @RustIsWinning Месяц назад +6

      What do you mean?

    • @koncreate8744
      @koncreate8744 Месяц назад +2

      @@RustIsWinning the way devs makes extra money is on teaching and courses. Since being a founder is wildly unrealistic for most.

    • @ClimateChangeDoesntBargain
      @ClimateChangeDoesntBargain Месяц назад

      true, Rust is addictive

    • @ITSecNEO
      @ITSecNEO Месяц назад +2

      @@leshommesdupilly That's true for every language, wth is your point about? It's natural that we need to have some selling points, otherwise no one would care about yet another new language.

    • @computernerd8157
      @computernerd8157 Месяц назад

      I have seen that when I first learned Java and Python as well. I do find it weird that they have a special name for themselves. I am dabbling with Rust so I can learn it but too me all langauges are just tools. C++ is my fav, Python kind of grew on me as I learned GDScript. C amd C++ gives me the most joy to use though as of now.

  • @CaptTerrific
    @CaptTerrific Месяц назад +1

    I like using cmake in visual studio:/

  • @Kerivity
    @Kerivity 5 дней назад

    What if I used rustoleum to remove the rust from my computer?

  • @random_bit
    @random_bit Месяц назад +44

    i picked up C++ in school, hated it dropped it.
    i picked up Rust, stayed with it to this day.
    tried picking up C++ again, instantly hated it again. i just hate having to waste time with makefiles and a very useless compiler throwing segfaults. Templating also was just not a great experience given the above mentioned.

    • @ClimateChangeDoesntBargain
      @ClimateChangeDoesntBargain Месяц назад

      I used to being passionate about C++ and regularly watch CppCon etc. Recently, I started to watch "C++ Zero Overhead Pass by Value Through Invocable C++ Abstractions" to see what's going on in C++ these days, and I instantly was reminded why I focus on Rust these days

    • @mbrofoc
      @mbrofoc Месяц назад +21

      Skill issue for me

    • @leshommesdupilly
      @leshommesdupilly Месяц назад +22

      @@random_bit Skill issue

    • @ensuretime
      @ensuretime Месяц назад

      What the hell are you doing with c++ to have segfaults? I make low level tools for reverse engineering with undocumented material and I don't have segfault like you, wtf

    • @random_bit
      @random_bit Месяц назад +11

      @@mbrofoc yeah, and you can keep the skills IDGAF about using a 40 year old language where the community sentiment is exactly your response.

  • @naranyala_dev
    @naranyala_dev Месяц назад

    sometimes drawing creates new conspiracies, such as the P

  • @marcoceriani1069
    @marcoceriani1069 Месяц назад +3

    8:52 a little bit of embedded in my life, a little bit of games by my side, a little bit of ML's all I need, a little bit of compilers is what I see, a little bit of networks in the sun, a little bit of OS all night long (Arch by the way), a little bit of performance here I am, a little bit of DBs makes me your man.
    Sorry, going back to my PoC :P

  • @infastin3795
    @infastin3795 Месяц назад

    Don't really want to come back to C++ because of "The Rule of 5" and exceptions. Everything else is fine for me.

    • @kodirovsshik
      @kodirovsshik Месяц назад

      Wdym "because of the rule of 5"? Your class either does resource management, in which case it is absolutely necessary to either implement the, you know, resource management or wrap your resources in RAII wrappers so that you don't ever have to deal with it, or your class doesn't do resource management - in which case you likely don't need the rule of 5.
      Like it's literally that simple. Want resource management? Yes - implement it, no - use wrappers and forget about it. What's the big deal for you?

  • @thunder852za
    @thunder852za Месяц назад

    I know people who have had template errors where they needed to pipe and grep the error message out because it was too long... XD

  • @kayakMike1000
    @kayakMike1000 Месяц назад

    Namespaces are pretty cool

  • @Ujjawal-of9gw
    @Ujjawal-of9gw Месяц назад +2

    I love you prime

  • @thunder852za
    @thunder852za Месяц назад

    I have been doing c++ and python programming for more than 10 years and still cout/print for debugging. Am I a bad person? Even for highly parallel applications I find printing out just is more natural to understand program flow.

    • @isodoubIet
      @isodoubIet Месяц назад +2

      Nobody thinks you're a bad person but you'd be more effective if you learned to use your development tools

    • @thunder852za
      @thunder852za Месяц назад

      @@isodoubIet doubt it. ;)

  • @nerfplaymaker8973
    @nerfplaymaker8973 Месяц назад +24

    2 views at -3 seconds bro fell off

    • @spaceowl5957
      @spaceowl5957 Месяц назад

      91 views at 2 minutes, this channel is dying

  • @huuthongle8768
    @huuthongle8768 Месяц назад

    I only use c++ to solve leetcode questions.

  • @ClimateChangeDoesntBargain
    @ClimateChangeDoesntBargain Месяц назад +1

    In the time you get started with CMake set up CMake for cross plattform development with various differently organized dependencies, you could have already implemented your project if you subtract the time of CMake hassle

  • @AScribblingTurtle
    @AScribblingTurtle Месяц назад +1

    OOP is not for games?
    One of the best selling games of all time was created in a language that is nothing but Object Orientation.
    ** Laughs in Java **

    • @_ClericalError_
      @_ClericalError_ Месяц назад +1

      Games like Minecraft and especially Terraria (different game, but also written in an OO-first language, C#) use a style of the language where most of the code is in global scope and the state is also kept in semi-global variables.
      It isn't elegant, but it is more performant by an enormous degree.

  • @alexpyattaev
    @alexpyattaev Месяц назад +1

    Cmake is just about as bad as build systems get.

  • @kuollutkissa
    @kuollutkissa Месяц назад

    Are we gonna ignore someone confused clones and stormtroopers

  • @HimanshuSharma-sd5gk
    @HimanshuSharma-sd5gk 22 дня назад

    you dont shoot your leg, you blow it with c++.

  • @miomip
    @miomip Месяц назад

    I can say from 5 years of Gradle. Cmake is garbage. I can understand how Cmake is usefull, but still. I'm currently trying to learn myself OpenGL in c++ and I have used way to much time to figure out Cmake and other builders for C. I'm going to use Kotlin with Lwjgl, to take advantage of Kotlins strengths, but I have to understand how it works first. Might take a look at Rust later.