Do You Like C or C++ More ?

Sdílet
Vložit
  • čas přidán 18. 11. 2023
  • Live on Twitch: / lowlevellearning
    👨‍💻💬 Do you prefer C or C++? 🤔#C #programming #coding #developers #tech
    🏫 COURSES 🏫 Check out my new courses at lowlevel.academy
    🙌 SUPPORT THE CHANNEL 🙌 Become a Low Level Associate and support the channel at / lowlevellearning
    Why Do Header Files Exist? • why do header files ev...
    How Does Return Work? • do you know how "retur...
    🔥🔥🔥 SOCIALS 🔥🔥🔥
    Low Level Merch!: lowlevel.store/
    Follow me on Twitter: / lowleveltweets
    Join me on Discord!: / discord
  • Věda a technologie

Komentáře • 1,1K

  • @norhamsfinest9761
    @norhamsfinest9761 Před 6 měsíci +4140

    I don't mind C++ code I wrote because I only use the subset of features I like and understand. The biggest problem of C++ is that everyone uses a different subset of the language and so trying to learn a new program every is like learning a new language.

    • @capsey_
      @capsey_ Před 6 měsíci +94

      Ding ding ding ding!

    • @sacredgeometry
      @sacredgeometry Před 6 měsíci +189

      Exactly this. Good C++ looks and behaves a lot like C anyway. Just with classes.

    • @maciejprokop2001
      @maciejprokop2001 Před 6 měsíci +7

      Yeah o think you're right man !

    • @sqrt7956
      @sqrt7956 Před 6 měsíci +12

      This is similar to the problem with Kotlin as well! Reading others' Kotlin is so hard lol

    • @SkyyySi
      @SkyyySi Před 6 měsíci +39

      ​@@sacredgeometryIf you think that C++ is just C with classes, then you probably never used anything beyond C++89

  • @happyfase
    @happyfase Před 6 měsíci +3490

    With macros, every C++ project becomes it's own programming language.

    • @mdev790
      @mdev790 Před 6 měsíci +108

      Not macros but more like templates

    • @homelessrobot
      @homelessrobot Před 6 měsíci +158

      even without templates, ever c++ project is its own programming language because every project uses a different subset of the language.

    • @NimerionTech
      @NimerionTech Před 6 měsíci +12

      @@homelessrobot go binary then.

    • @homelessrobot
      @homelessrobot Před 6 měsíci +54

      @@NimerionTech binary isn't a programming language

    • @tsunamio7750
      @tsunamio7750 Před 6 měsíci +38

      @@homelessrobot He doesn't know about assmblers i think. Just don't bother with the guy. His soul will forever rest in heaven.

  • @bobson_dugnutt
    @bobson_dugnutt Před 6 měsíci +1253

    "You can tell what every line of code is doing"
    *laughs in compiler optimizations*

    • @phusicus_404
      @phusicus_404 Před 6 měsíci +50

      "As-if" principle

    • @WillD-jj9kg
      @WillD-jj9kg Před 6 měsíci +14

      Haha yeah man that's wild, no just kidding I got no clue or care what that means 😂

    • @koiledPythonRain
      @koiledPythonRain Před 6 měsíci +36

      Excactly. This seems like an ego problem

    • @pyrus2814
      @pyrus2814 Před 6 měsíci +35

      You seriously overestimate how much the compiler actually does.

    • @scr4932
      @scr4932 Před 6 měsíci +19

      ​@@WillD-jj9kgThe compiler may optimize the code while compiling it to make it faster depending on how it's configured.

  • @ISKLEMMI
    @ISKLEMMI Před 6 měsíci +1539

    People say you can simply avoid using the ugly parts of C++. The problem is that you still have to read and use code written by people who DO use those features.

    • @KanashimiMusic
      @KanashimiMusic Před 6 měsíci +23

      Sadly, at this point, you literally can't even avoid those parts while writing code, either.

    • @captainfordo1
      @captainfordo1 Před 6 měsíci +50

      @@KanashimiMusicyou can, just remove the those two little p’s at the end of the file extension

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

      @@captainfordo1 Yeah, but as soon as you access those files from cpp code you gotta deal with the same shit

    • @NinjaRunningWild
      @NinjaRunningWild Před 6 měsíci +1

      Have to?

    • @Dremth
      @Dremth Před 6 měsíci +11

      You should try not collaborating with bad programmers. It's pretty nice.

  • @reynoldskynaston9529
    @reynoldskynaston9529 Před 6 měsíci +614

    Low level is great because it feels like you understand everything but abstraction is great cause you can get stuff done quick

    • @natescode
      @natescode Před 6 měsíci +23

      There is a point where abstraction goes too far. EVERYTHING in C++ can mean something else. Macros, operator overloading and numerous features makes it extremely difficult.

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

      Hence why C hits the sweet spot for me.

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

      Abstraction is good if you have a large code base and need to extend and modify the code. With a very good software architecture a similar convenience level can be achieved in C, but a) you have to be able to really really create such a good architecture and usually you notice too late all the oversights you made and b) if a new guy joins the team, you have to teach him a lot about how this architecture is too work. In contrast, every C++ developer knows how C++ inheritance works, so you have that covered already.

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

      Abstraction is good, if you don't need bare metal access, but why on earth C++? It has features that don't matter if you need abstraction, but lacks features if you value it. It's like it takes the worst of both worlds: it's bad for if you need abstraction and it's bad if you need low level access.

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

      @@powertomato In C++ you can do very low level things. In embedded systems that is important for a few things. A language that doesn't allow direct interaction with the hardware is not suitable for ended systems.

  • @nicholasfreitas8662
    @nicholasfreitas8662 Před 6 měsíci +309

    never show this man python

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

      For real lmao. Python is the pinnacle of abstraction!

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

      @@finalformluigilol you don’t know ruby 😂

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

      @@julian_handpan you're correct; I did not know ruby, but I did a little speed reading and I feel like it's got a bit of that assembly flavor hidden in there so I'm gonna have to say its not zen enough for me 😜

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

      @@finalformluigi a lot of meta programming in ruby my friend!

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

      @@julian_handpan python has meta programming too. both languages are very similar; I was just poking some fun at Ruby's syntax.

  • @karansethia1037
    @karansethia1037 Před 6 měsíci +691

    That one guy at every hackathon

    • @user-hl3qv8qg2s
      @user-hl3qv8qg2s Před 6 měsíci +37

      imagine this guy talking to women. lmao

    • @Cobalt985
      @Cobalt985 Před 6 měsíci

      @@user-hl3qv8qg2s people like this are the only reason the internet works

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

      Do people who already know how to code go to hackathons or is that a place to learn how to code too?

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

      I think both​@@HeyIntegrity

    • @Dom-zy1qy
      @Dom-zy1qy Před 3 měsíci +20

      ​@user-hl3qv8qg2s You would think that, but there are many women who appreciate guys like him, and how they articulate things; even if its nerdy. I have a friend who's slightly more attractive appearance wise, he's legit got a fkn harem at his college.
      I don't know how tf that happened, but he's had like 4 different groups of females orbit around him.
      I think being authentic is a big part of it.

  • @lukewatson8848
    @lukewatson8848 Před 6 měsíci +1092

    "'Do you like C or asm more?' Dude, 100% like asm more, now this gonna probably come off as a skill issue, and it might, but, I don't like C because I think it abstracts away a lot of how the computer actually behaves. The reason why I like asm is because I can tell you exactly what every line of code is doing on the actual hardware."

    • @WoWUndad
      @WoWUndad Před 6 měsíci +552

      Do u like asm or electrically charging each transistor 1 by 1 and poking the logic gates manually

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

      👍

    • @EmptyJarDoto
      @EmptyJarDoto Před 6 měsíci +98

      Yeah that logic is so cringe.

    • @natescode
      @natescode Před 6 měsíci +82

      ​@@EmptyJarDotocompletely sound actually. Have you used C++? It has every feature known to man.

    • @natescode
      @natescode Před 6 měsíci +23

      ad absurdum.

  • @giannismentz3570
    @giannismentz3570 Před 6 měsíci +225

    You're obviously correct. You read C, you know what it does, C++ not so much. But that's the thing with OOP and higher level. That's the point. You don't really care to know how a tire is made. You just wanna use a tire to swap it for your flat tire in your car. In the same way, I don't wanna build a doubly linked list in C yet again, I'd rather just use something like a C++ std::list or whatever suits my problem.

    • @BigJMC
      @BigJMC Před 6 měsíci +18

      Yeah but the issue arises when you’re doing more advance stuff or debugging with those types especially on such a low-level language you need to know exactly what it’s doing which can be really difficult with C++
      Edit: don’t worry guys, I was wrong. Decided to buy a C++ textbook and go back and study it a lot more in-depth. Ended up liking it a lot.

    • @giannismentz3570
      @giannismentz3570 Před 6 měsíci +73

      @@BigJMC if you're doing more advanced stuff, you'd wanna use libs others wrote, you don't wanna reinvent the wheel. You pretty much know what the structures you are using are doing. Most libs also have documentation. I wouldn't worry as much on debugging, most problems are likely gonna be in your code.

    • @joshnjoshgaming
      @joshnjoshgaming Před 6 měsíci +1

      exactly

    • @alish2001
      @alish2001 Před 6 měsíci +9

      @@BigJMC as giannis said then you'd wanna use battletested libraries not reinvent the wheel.

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

      @@giannismentz3570 I would but I’m writing a game engine that sits directly on top of the Vulkan library which means it’s very time sensitive, I need to make sure my buffering and render call’s aren’t being held up by another library or it’ll cause big fps drops.
      Plus I wouldn’t even know what the libraries are actually doing, they could be doing the most inefficient loop calls known to man and I would be loosing my mind for hours straight wondering why my code is running so slow.

  • @sinom
    @sinom Před 6 měsíci +89

    This in general is a "problem" with abstraction. You trade code that is more traditionally readable and more concise for not immediately knowing low level details of what does what.
    Which is better is very dependant on the use case and personal preference.
    For most sub millisecond usecases I've had to deal with when writing stuff with C++ using some linear algebra library that does operator overloading it was more than fast enough for the job while making it just easier to write simple vector and matrix maths.

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

      It literally makes everyone hate c++ in a production environment.

    • @egg-mv7ef
      @egg-mv7ef Před 6 měsíci +15

      people forgetting they can ctrl + click to go to a class definition and use their eyeballs to see what the overload does is crazy

    • @Deadmanstrolln
      @Deadmanstrolln Před 6 měsíci +15

      ​@@egg-mv7efc coders are a wild bunch. Them and bash scripters are the only group you'll find refusing to use IDEs in general. In reality, unless you absolutely need the best performance down to nanoseconds, you probably shouldn't be dealing with C at all. Use a modern language and develop 100x faster with infinitely easier to read code.

    • @egg-mv7ef
      @egg-mv7ef Před 6 měsíci

      @@Deadmanstrolln eh c++ is great to use tbh i use it for almost everything. this dude in the vid straight up doesnt know what hes talking abt

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

      ​@@egg-mv7ef this isn't reliable 100% of time in 100% of IDEs, yes you can find how the abstractions are implemented but if the abstraction wasnt necessary to begin with all it means is anyone reading that code is going through more steps than they need to to figure out what thw code is doing.

  • @segueoyuri
    @segueoyuri Před 25 dny +2

    I have the exact same issue with C++. After years without touching C++ and only dealing with C I went to look and algorithm thinking I could just apply it to whatever I was doing and I couldn't. What the functions were doing weren't clear to me. I was def weirded out

  • @3KLANGMUSIC
    @3KLANGMUSIC Před 6 měsíci +81

    Many people told me Im the smartest guy that they ever met. So I bought an Unreal Engine C++ course, but the only thing I learned was that they lied to me.

    • @TheShmrsh
      @TheShmrsh Před 8 dny +1

      😂😂😂

    • @TheShmrsh
      @TheShmrsh Před 8 dny +1

      I had a friend he tried to learn that shi too and he ended up quitting after not event getting past vs code

  • @zonea4860
    @zonea4860 Před 6 měsíci +458

    In my personal projects I generally just create cpp files but write mostly C code and occasionally use C++ features where I need them and where I see a clear benefit over C counterparts. That's also why I really LIKE C++. You (mostly) aren't forced to use C++ features. Theoretically if someone really wanted, they could write a program in C++ but only using C features without anything from C++. Also I think there are good uses for both C and C++. For example when I'm writing more low level stuff (like drivers, internal os stuff etc) I like to use C. But for example when I'm writing code for games or stuff with UI, I prefer C++ and the OOP aproach instead of functional. This is my personal opinion, but writing game stuff or UI stuff not in OOP is pain, and on the other hand writing low level stuff in OOP is pain too, so I think everything has it's own use cases

    • @mage3690
      @mage3690 Před 6 měsíci +18

      My biggest complaint with trying to write C in C++ is the fact that MSVC doesn't comply to any _remotely_ modern C standard. So I do things that C should be able to do, and get hella frustrated as a noob because I downloaded Visual Studio because "internet said start with Visual Studio." But what you said is absolutely right, my problem is with the discrepancy between MSVC and RTFM.

    • @leggoentertainment2947
      @leggoentertainment2947 Před 6 měsíci

      ​@@mage3690would vim solve this?

    • @vinylSummer
      @vinylSummer Před 6 měsíci

      ​@@mage3690just use Linux

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

      it's possible C existed long before the idea of a closure existed, im not completely sure, but if C just had closures then i think you wouldnt necessarily need to use C++ for game development because closures on its own can accomplish many of the same things that an OOP language can but that an OOP language needs multiple separate features for. its really odd that C seems to continue to not adopt the idea of closures because it's a feature that would fit in perfectly with C and that is basically a given in any other much more modern functional-centric language.

    • @mage3690
      @mage3690 Před 6 měsíci

      @@Templarfreak what do you mean by a "closure"? Do you want a locally scoped variable inside a function to retain its value between function calls? That's the "static" keyword you're looking for. Do you want to call a function via dot operator? Let me introduce you to the wild and whacky world of 🌈 function pointers 🌈. It goes a little like this:
      struct mystruct {
      int a;
      void (*printvals) (struct mystruct);
      };
      void printvals(struct mystruct mystruct) {
      printf("d%", mystruct.a);
      }
      struct mystruct mystruct = {3, printvals};
      Then just call it by going "mystruct.printvals(mystruct);". It's a little annoying to type "mystruct" twice at the calling point, but I have not a singular clue how one would manage it without that. I'm pretty sure C just isn't that smart. Also, unless you use a constructor function (a macro would probably work best for that), that function pointer could point to any void with a single argument of type mystruct. Not sure how many of those you have lying around, but it's conceivable that that could screw things up.

  • @CrittingOut
    @CrittingOut Před 6 měsíci +13

    I like C++ more as long as it's used for the initial goal of "C with classes"

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

      But, that is not the point of C++. The point of C++ is versatility, limit itself to what C does, but to expand on it.

  • @muvoksismakings
    @muvoksismakings Před 6 měsíci +35

    You would probably vomit while doing ruby. I dont have this issue with c/c++ but holy shit the amount of 'magic' ruby has going under the hood its disgusting.

    • @natnial1
      @natnial1 Před 6 měsíci +42

      I don't see any problem with my code accidentally summoning demons

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

      it pretty 😍

    • @Drummerx04
      @Drummerx04 Před 6 měsíci +14

      Well, now we really are comparing apples to coca cola, aren't we?
      Ruby is just a prettier python to me. If i need a hardcore text processing program, ruby is my go to language because everything I need to do that is front and center in the language syntax.
      Example: I used ruby to generate custom C++ template libraries and DDS interface files from xml schemas.
      I could have built the tool in C++, but it likely would have taken several times longer to write and the only benefit would be saving 1 second of runtime processing every 4 months or so.

    • @RetroAndChill
      @RetroAndChill Před 6 měsíci +8

      I mean isn’t that the point of a scripting language? It’s for doing high level processing where you don’t care about having direct control over the OS.

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

      Why would I care about instructions on the OS when wanting to parse a string lol

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

    I don’t need to sort through my entire T shirt thread by thread to understand it’s an article of clothing

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

      Abstractions are great for saving time and not reinventing the wheel every day. Everything has its costs, low level is great but not a one size fits all

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

    I don’t like assembly either. I like to exactly know what bits are getting executed in the machine.

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

      I dont really like machine code either. I like to know where my electrons are, I need to see what my electromechanical transistors are doing!

    • @borisletic
      @borisletic Před měsícem +7

      ​@artemis4771atoms are too abstract...I like elementary particles more...

    • @johnver9245
      @johnver9245 Před 20 dny +5

      You guys are pathetic, when I code I wanna know exactly what quarks and leptons are doing. It's fundamental to know about them if you wanna keep track of your protons, neutrons and electrons.. 😂

  • @rachit7645
    @rachit7645 Před 6 měsíci +309

    Obligatory skill issue

    • @douwehuysmans5959
      @douwehuysmans5959 Před 6 měsíci +25

      Oh god, the zoomers are starting to join the workforce

    • @wiczus6102
      @wiczus6102 Před 6 měsíci

      @@douwehuysmans5959 Pretty sure milienials know what skill issue is.

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

      ​@douwehuysmans5959 it's much too soon ...

  • @platin2148
    @platin2148 Před 6 měsíci +171

    The worst thing is classes in 600 hundred different files which inherit methods from some parent / or abstract class that then is defined somewhere as virtual thingy somewhere else.

    • @AntonioZL
      @AntonioZL Před 6 měsíci +16

      Jesus christ, I hate that. It makes everything so hard to follow.

    • @clementlebeau484
      @clementlebeau484 Před 6 měsíci +11

      I feel like inheritance can be decently readable as far as there’s a UML class diagram to follow along with

    • @platin2148
      @platin2148 Před 6 měsíci +16

      @@clementlebeau484 Which there is non 99% of the time + even the will not help to find which virtual interface is behind X can only give you possible options.

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

      OOP is really basic why dont you take the time to learn abstraction and inheritance?

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

      @@Cd5ssmffan It‘s a tool but i never said that it’s difficult to use but it’s creating code that is easily viewable without having a full indexer + IDE in it is not possible to brain compile except for extremely basic things. The Argument you make that i don’t know it seems to be inferred by simply nothing.

  • @mintx1720
    @mintx1720 Před 6 měsíci +10

    rust can also heap allocate with the minus sign lmao

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

    bruh he literally said skill issue, im dying LMAOO

  • @mu11668B
    @mu11668B Před měsícem +7

    I didn't know I wasn't alone.

  • @gerarddip
    @gerarddip Před 15 dny +1

    I legit had a nightmare yesterday that I was sitting at my desk in my dorm in a really bad incongruous outfit, typing “word.word.word.word.word” and trying to compile it and I’d get some errors, then I’d keep adding more “.word”s only for it to keep failing. I had a C++ nightmare.

  • @codelapiz
    @codelapiz Před 6 měsíci +75

    you should try c#. in c# not only dont you know what the OS is doing, you dont know what the program is doing on any level. It may just randomly decide because of how you spelled a variable name that it is gonna create a SQL server, or provide an API endpoint with that name.

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

      csharp is like lego

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

      C# code is way more easier to understand then C++.

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

      As a C# fan, this is so accurate.

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

      Can't mate. You need a language that compiles to machine code for low level or kernel programming. C# is like java in that sense. C/C++, Rust and Zig are a few that can do this. Yes, there are workarounds for some, like fortran. But at this point, if you're not going with Rust or Zig, you might as well stay with C/C++

    • @eyoo369
      @eyoo369 Před 27 dny +1

      I love C# for web projects. From backends to frontend. It’s great for that.

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

    Abstraction is the name of the game though. In a well written program, you should be able to tell *what* is being done, but you don't need to know *how* for most of it. The less implementation you have to keep in your head, the more space you have for other ideas. Abstraction lifts the burden, and makes it much much easier to write incredibly complex programs without needing to understand every nuance of complexity all at once.

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

    I like c++ because I can choose how much I want to abstract if at all. And once you get experienced with it, you know what's underneath the abstractions too and can think of it in both ways.

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

      Yes. In general C++ is just a C (except constructs which are not compatible in C++ standard with C) with many OPTIONAL extensions. You can select what suits you the best.

  • @lonelyshpee7873
    @lonelyshpee7873 Před 6 měsíci +28

    C++ is what happens when you take a simple langauge like C, that is very close to the hardware, and add a bunch of features that allow you to abstract away from it... But coding in C often makes me wish I could use C++ features. So the solution would be to code in C++, but only use the C++ features you want. That's fine if you're the only programmer, but if you're in a team? You're opening the floodgates of incomprehensible code.

    • @KanashimiMusic
      @KanashimiMusic Před 6 měsíci +8

      The problem is that we're at a point where not all C code is valid C++ code anymore, and I feel like at that point the language just fails at what its purpose was

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

      INTRUDER ALERT! A RED SPY IS IN THE BASE!

    • @cmxpotato
      @cmxpotato Před 6 měsíci +1

      That's why you enforce linters and static analyzers in your cicd pipeline to make sure the team follows the standard. This shouldn't be too much of problem since you should always have that pipelined whether it's C++ or any other language.

    • @martijn3151
      @martijn3151 Před 6 měsíci

      Just make sure you lay down programming rules in your team, and all will be fine.

    • @mynameisjeff9124
      @mynameisjeff9124 Před 6 měsíci

      ⁠@soyel94
      int main() {
      char* xs = malloc(128);
      return 0;
      }
      This compiles in C but not C++, because you can’t simply concert pointer types without explicitly casting.

  • @Klosterhasi
    @Klosterhasi Před 6 měsíci +259

    "c++ abstracts away a lot of how the language actually behaves" yeah. thats. the point. of higher level programming languages. If we know all 10 ways to use pointers, we dont need 1 Million people implementing the other 90 shitty ways on accident because they didnt spend 3 years coming up with already known best practices by themselves.

    • @user-gz1nv6nw3q
      @user-gz1nv6nw3q Před 6 měsíci +48

      I hate C++! It makes everything so much simpler! Ahhhhh!

    • @ViolentFury1
      @ViolentFury1 Před 6 měsíci

      ye except c++ implementations suck and when you do to have performance you will throw out c++ bullshit abstractions and use c

    • @BigBoss0112
      @BigBoss0112 Před 6 měsíci +33

      extremely weird comment considering the entire point of the short is that he knows WHY c++ does these things but he just doesnt like it. i can tell 100% youre an ego coder

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

      ​@@BigBoss0112"ego coder" woah, new phrase to be stolen

    • @SeeMyDolphin
      @SeeMyDolphin Před 6 měsíci +7

      But isn't the point that higher level languages usually come with additional features to compliment the abstraction, like memory safety/garbage collection, etc. and C++ doesn't?
      C++ reads like a high level language yet acts like a low level language, whereas C reads and acts like a low level language.

  • @seanhollibaugh3776
    @seanhollibaugh3776 Před 6 měsíci +10

    Hard agree, c++ is difficult to read, i hate having to constantly pull up manual pages

    • @martinprochazka3714
      @martinprochazka3714 Před 6 měsíci

      If you find C++ hard to read it's your colleagues who are to blame. You could write stinky unreadable code in any language if you really wanted to.
      And yes, C++ is difficult, that's why not everyone should be using it. It's not like you go design nuclear reactors after taking your physics introductory course, why is everyone thinking they can get away with it in CS? If you suck at programming just do Python and be happy its not like it pays less than C++ 🤷

    • @cd2320
      @cd2320 Před 10 dny

      Lol and you don’t have to do that with C? Have you never dealt with Linux code? Or any library or API whatsoever?

  • @AxelStrem
    @AxelStrem Před 6 měsíci +65

    and in C you'd have to call it "calculate_difference"... and it still can do heap allocations

    • @bies_moron4404
      @bies_moron4404 Před 6 měsíci

      IT IS ACTUALLY - OPERATOR IN HIS CODE AND ALL ITS DOING IS SUBTRACT SIZEOF STRUCT FROM PAGE SIZE

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

      @@bies_moron4404 I guess my point was that in C you still have to call functions, and all this reasoning can be applied to function calls just as well: you can't tell what a function actually does just by looking at its name. Does this mean it's a dangerous abstraction? Can we even use functions if we want to "know what every line of code does exactly"? If someone writes a function that mines bitcoins and names it "calculate_factorial" is that really a language problem?

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

      @@AxelStrem - You're kind of missing the point though. A function doing a heap allocation doesn't apply to what he's talking about, because that function would be known to do a heap allocation - you know it's explicitly calling that function, whereas the minus operator is overloaded so at a glance, you don't know what function it's calling until you look up and get the types at that location and figure out which overload of the operator it's going to use. But if you explicitly use, say, "set_sub", you know just from the call-site that it's going to do a subtraction operation on a set, and that's going to necessarily return a new set which will have to be allocated.

    • @cd2320
      @cd2320 Před 10 dny

      @@KingBobXVIand you would know that that particular overloading does a heap allocation. It’s a function like any other, it’s not rocket science.

  • @scottlivezey9479
    @scottlivezey9479 Před 7 dny +1

    When I was involved with software development full-time, I never made the leap from C to C++. My main issue with the whole concept of C++ stemmed from its lack of efficiency. This commentary over 25 years later is music to my ears. 😊

  • @emstallz1781
    @emstallz1781 Před 7 měsíci +97

    I like operator overloading! For example to concatenate string you can use the + symbol, which is pretty intuitive. Also for file system paths you can use / operator to concatenate paths :)

    • @jacksonsmith2955
      @jacksonsmith2955 Před 6 měsíci +42

      I think that works decently in high level languages like Python that are already super abstract, but in low level languages that kinda gives me the ick ngl. If I'm making a function call I wanna SEE that I'm making a function call.

    • @emstallz1781
      @emstallz1781 Před 6 měsíci +17

      @@jacksonsmith2955 I understand, but I wouldn’t call C++ particularly ‘low level’. Yes, you have access to low level functions, but does this make the programming language ‘low level’? C++ is very versatile and the developer can choose if they want to program in abstracted layers of code, or just stick to the bare bones. You aren’t forced to use these operator overloading functions at all. But why program in C++ if you aren’t taking advantage of these features? Then yes, use C. Both have their own use cases and some overlap :)

    • @jacksonsmith2955
      @jacksonsmith2955 Před 6 měsíci

      @@emstallz1781C++ better be low level if it wants to excuse that template syntax imo, doesn't have much else going for it

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

      Something about this doesn't sit right with me, you've defined '/' on strings but not all strings are paths.
      I'm not saying it's wrong, and as long as you're comfortable with it then great, but I personally wouldn't do this.
      My comment also doesn't mean operator overloading is intrinsically bad either.

    • @emstallz1781
      @emstallz1781 Před 6 měsíci +16

      @@sb_dunk I might be misunderstanding, but the overloaded ‘/‘ operator only works on file path objects in std::filesystem::path. You can (and that’s the beauty of it) use this operator to concatenate a string to a path object. The library takes care care of OS specific filesystem paths (posix, windows). I strongly recommend you to take a look (and tinker) at it to understand it better, and see how intuitive and easy it makes handling file paths :)

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

    using a c++ compiler but pretending to write in c while reserving things like polymorphism, virtual functions and the standard library for when they are critical is my preferred approach.
    when working low-level like in graphics programming, oop and other random things ends up getting in my way later on.
    namespaces tho...

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

    I think it's highly overestimated how much a programmer knows about what's happening. Even if you write C code, there are still compiler optimizations and translations from CISC to RISC instructions in the processor. On top of that, you have several optimizations happening in hardware such as out-of-order execution, branch prediction, or register renaming. Imho, the programmer has less control over the things that are actually happening than many programmers like to believe. Nonetheless, it is good to have a basic understanding of the things that are happening, but the desire to always write code where you 100% understand what's happening leads nowhere - it only leads to code which the programmer feels like being super performant and optimized. However, we don't need code where the programmer has a good feeling about performance and optimization. We need code that is actually performant for real but still readable and debuggable.

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

      Can you say that in clash royale terms 😖

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

      SO what you're saying is, I should be writing stuff in assemble to truly understand everything going on?

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

      @@mycelia_ow Even if you do that, you still can't be 100% sure what the CPU will do with this at the end. Writing a few small programs in Assembly is really good idea to get a better grasp of the interaction between CPU, the OS, and your application. However, for productive use, I would recommend to avoid Assembly as much as possible.

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

      ​@@fr89kis there a way to do it then?

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

      @@turnoff7572 Of course. You can learn about CPU micro architectures and build your own CPU, emulated on FPGA. However, this really takes a significant amount of time and it's not worth it if you don't need to know the inner workings of a CPU. However, as a software developer you should always be aware that you probably know less about the things that are actually happening in the CPU than you like to believe.

  • @sherwinbangs
    @sherwinbangs Před 24 dny +1

    That's the beauty of cpp as well! Do whatever you want. If someone's code is unreadable it's not a language fault

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

    python developers: 🤨

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

    Respectable answer. I am the exact opposite. I find C++ so comforting to read and I have a better time reading all of the little macros and overloads than when I code in C

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

      I regret that C++ inherits macros (and plain includes) from C as this is a pure and evil cancer of a modern programming language.

  • @FyberOptyk
    @FyberOptyk Před 6 měsíci +9

    I wonder if this guy would have a stroke if asked about C#?

    • @Phantom-lr6cs
      @Phantom-lr6cs Před 2 měsíci

      c# is easier than c++ and c . so what a stroke ? idk

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

      @@Phantom-lr6cs C# is DIFFERENT. Not really easier than C, as it has a lot of features which are not present neither in C nor C++.

  • @hallrules
    @hallrules Před 6 měsíci +1

    I understand your point, because I have seen some C++ code before and sometimes it looks like a completely different language and I always need some kind of translator to see what's going on. But, if you write C++ code like C, you get to use all the new features of C++ without having to worry about installing a third-party library or straight up building it yourself.

  • @arakwar
    @arakwar Před 6 měsíci +30

    So basically you prefer what you know. As most people does.

    • @natescode
      @natescode Před 6 měsíci +1

      No, he prefers sanity. Do you even code ? 😂

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

      Listening comprehension zero. You.

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

    i usually prefer c but sometimes i write some damn fine c++ that feels pretty nice

  • @renato360a
    @renato360a Před 6 měsíci +22

    these C lovers really hate operator overloading.. But that is the feature that I like the most about C++ and that sets it apart in freedom for creativity. Of course there's a very limited use case for it, but it is extremely helpful in my area, computational mathematics.

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

    Just use the good features, and make sure your company has a style guide and code review process that only lets the good features in.

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

      This requires decent programmers though :D

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

      @@PiotrPilinko Decent programming normally does.

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

    Higher level language abstracts functionality of lower level language to make it easier and faster to write? Ain’t no way 😆

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

    It all depends on what you're doing. I prefer C++ more for games or higher level stuff because C++ is a higher level language. If you're trying to do something lower level, then you should definitely use C. Now theoretically you could do everything in either language, but using one over the other for certain tasks brings a lot of benefits. A lot of times I find writing generic code in C to be super cumbersome since using generics requires you to manually keep track of types and to typecast everything. C++ just does it for you and it works great and all your code becomes very reusable

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

      C++ can be the same level as C: if you don't use the feature, it has no impact on your code performance. But if you ever try to write a code with multiple potential failures it is much easier to do this with C++ and with exceptions than with C and error codes - specially if there are a lot of allocated resources when the failure occurs.

  • @MrSlowestD16
    @MrSlowestD16 Před 6 měsíci +23

    Eh, I [generally] prefer C as well, but this complaint is just b/c he's a new developer. When you get into large C code bases they become abstract as well - they have a whole book of utility functions in their util files to work with 'primitives' in their abstracted form. This is where the operator overloading he's complaining about really comes in handy, b/c now you can [for example] just add 2 complex numbers together with the + operator instead of calling a function passing both of them. It simplifies a lot of it.
    Also with the massive code bases, you wind up in function pointer hell, which has the same problem is abstracted class definitions in C++. You wind up with function pointers that get set to 1 of a dozen different functions at initialization so now you have no idea which one is being called unless you step through or printf all of them. Also, see opaque pointers, for how proper abstraction is done in C.
    If somebody is doing crazy things with operators, that's just bad design, you can do bad design in any language.
    When you're dealing with simple examples like in the window C may be better b/c you don't have to look at complex class definitions. But C for large code bases is equally as abstract. My main problem with C++ is more of a problem with OO in its entirety, and that's that people are afraid to not use it because it's considered a 'best practice'. So you wind up with these goofy fuckin ownership relations or friend classes b/c somebody's trying to over-design something simple.

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

      I would argue that function overloading in C++ is more transparent than the function pointer hell in C. If you have a good IDE, it can help you navigate the inheritance tree. However, in C it would be very very difficult for the IDE to find all the positions where the function pointers are assigned, so you are left on your own to find all the potential candidate functions which might be called, when the function pointer is called.

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

      @@fr89k Yeah I'd agree they're generally more transparent. But as a slight devil's advocate, while function pointer assignments CAN be anywhere, they're generally all localized in terms of file structure, so you're generally not looking too deep. But yeah, not as explicit as in C++.
      Wish I knew what a "good IDE" is though when it comes to C/C++ parsing, haha. They're all pretty shit except for visual studio (OG, not VS Code) IMO. Never found one that could pick up on everything. Most IDE's don't account for even the majority of all basic setups in C++ (eg. inheritance), but even if one nails that down it can't account for linker externs and stuff so it'll never account for everything. That's one thing that's a real pain point for C/C++, IMO. But yea, VS was quite good with parsing. Wish they open sourced that instead of the VS Code shit we got.

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

      C99 actually has complex numbers as a native type, so you used a bad example there 😅. But I fully agree, the C++-style of object orientation makes people overcomplicate everything. But object-orientation isn't bad in general, for example languages like Smalltalk keep it very understandable and simple.
      My best C++ experience has been with the Qt GUI-framework, because it manages to abstract things well enough so you really don't have to care too much about the low-level behaviors.

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

      @@imrevadasz1086 That's fair, never seen a native complex # in the wild before. I don't think OO is bad, but I do think OO as a general concept leads to people overcomplicating things and that it's not necessarily C++ specific. There's too much stress on the possibility of extending or augmenting code that it makes people over-complicate it, like making and inheriting from some interface that will NEVER be inherited from after. We even see this at a more basic level outside of inheritance, like #defining "NUM_DAYS_IN_YEAR" as if that will change at some point. Another issue is just that not everything fits nicely into an "object". Sometimes a function just needs to be a function, and doesn't need to maintain any state. In that case, OO just becomes a burden - but nobody will ever say it b/c merely suggesting that OO can be a burden in real life is wildly unpopular.
      I too enjoy the inheritance hierarchy of QT. It is very well done. It's unfortunately a bit obvious when seeing some of it why it's not as performance oriented as something like GTK, but the trade-off is that it's a very intuitive framework to use. It's my go-to for GUI apps. Wish the licensing was a bit better, but it's really great. 2 thumbs up from me.

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

      @@MrSlowestD16 True, in too many cases objects are used where just a "module" (namespace in C++) would be enough. Part of the problem in C++ programming is that a lot of people come to C++ from Java, which only offers Classes for modularizing and namespacing code, and every bit of code has to be in a class. Hence a lot of C++ code is written in Java style.

  • @AkiiiMatcha
    @AkiiiMatcha Před 6 měsíci

    I really feel you, I tried a lot of programming languages and when I had to decide whether I stick with C or C++, I instantly choose C just because as you mentioned in C++ sometimes it’s really hard to decipher the real purpose of a specific line of code. When you think you know C++, the language just kindly presents you the fact that you don’t know anything.

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

    Same, maybe I'm just actually too stupid for the more abstracted languages like JavaScript but I like C because I actually know what it's doing inside the computer. It's simple yet powerful.

  • @MrDaAsif
    @MrDaAsif Před 6 měsíci +10

    I like C++ but I'm pretty judicious in my use. Operator overloading is really nice if you're dealing with mathematical types e.g. arbitrary precision numbers

    • @RetroAndChill
      @RetroAndChill Před 6 měsíci

      For me the only operators I typically overload are = and ==.

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

      @@RetroAndChill I really don't like a lot of operator overloading I've seen for =. Part of what makes someone used to C have a hard time understanding what's happening in code

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

      @@RetroAndChilloverloaded = operator is evil, I don’t see any reasons to use it

    • @RetroAndChill
      @RetroAndChill Před 6 měsíci

      @@ic6406 Move semantics is a good reason to

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

      @@ic6406 If your class has a shared pointer (or even - god save us - a plain pointer) it is very unwise to use default implementation of an assignment operator - very unwise... Unless you want to keep the member object shared between all of the object of the class. So always check your class semantics.

  • @wattihrvolt-pn3pf
    @wattihrvolt-pn3pf Před 6 měsíci +7

    im gonna wait for him to learn about languages with implicit type conversion

  • @dougbennett3013
    @dougbennett3013 Před 15 dny

    C and C++ devs can never in their lifetimes comprehend the elegant beauty of Visual Basic.

  • @Salamaleikum80
    @Salamaleikum80 Před 6 měsíci +1

    How do I deal with that? For example Javascript is super abstract. You have Packages, Modules, API Microservices etc. and every time I want to do something I have to learn a new tool. I hate it so so much i can't even describe it. But at the same time i feel like the opposite of that would be me writing everything myself and reinventing the wheel... It's the most mind boggling thing to me in software development.

  • @TheRealJman87
    @TheRealJman87 Před 6 měsíci +12

    C++ is great **IF** you (and the code you are working with) stick to the standard and follow best practices for modern C++ (i.e. C++11 onward). Pre-C++11 was a nightmare and people who still code like that should just stop plz

    • @marcossidoruk8033
      @marcossidoruk8033 Před 6 měsíci

      Modern C++ makes me want to vomit.

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

      You're probably not gonna convince people who love c with this. The reason a lot of people who like c trash about c++11 onwards is because that's when it started doing a lot of things differently than just c. Pre c++11 code often feels bad to c++ devs because it feels like c code with classes added on top

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

      Modern C++ is pure crap.

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

      @@sinom One of the biggest C++11 features to me are smart pointers. Before C++11 you had a huge problem with keeping track of the ownership of objects. Even if you dislike shared_ptr because it does one additional redirect and you don't have 100% control over the destruction of the object, you have to agree that unique_ptr is awesome. Your method doesn't take ownership? Fine, you can still use raw pointers in the method arguments. Your method takes ownership? Use unique_ptr in the arguments and move the unique_ptr in from the caller. It's perfect to track ownership.

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

      @@fr89k C++11 has big issue with smart pointers. C++14 is much better with this case (but not perfect) but it break the compatibility - on the other side: it's not a big problem. Some features are also introduced with C++17 and C++20. But C++14 is usable.

  • @anassqadil1376
    @anassqadil1376 Před 6 měsíci +16

    skill issue :/

  • @suoyidl2654
    @suoyidl2654 Před 13 dny +1

    Everytime i hear someone say C is better then C++, i want to see a project where they don't use C++.

  • @tanchwa3740
    @tanchwa3740 Před 6 měsíci +1

    Me who just does string parsing and data structures for API calls "hmmm yes.... Heap calls and memories yes yes...."

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

    I think C++ is as readable as C. Everything which you can't read and know what's happening on the OS is just some form of a function call just like with C. You just have to bear in mind that you can call "functions" in more ways than just func(). For example: operator overloading
    In C++ (t1 + t2) should be read as add(t1, t2) in C where add is some user defined function (unless t1 and t2 are primatives).
    Complexity is not necessarily harder to read or understand it just means you need to look at the internals of those structures to find out what the programmer is doing, which lends itself to useful abstractions.

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

      Things get difficult quickly when you have lvalue, rvalue, pvalue, xvalue, gvalue and all the templates adding to the syntax. It is a language that’s difficult to read, understand and program(in certain styles). While in C, whatever you do you know if it is for the compiler or run time or just some macros you define, and you know what the computer is doing in memory.

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

      @@fdc4810 It's about good practices and a knowledge of a team members. Always. I've seen a lot of very obfuscated code in C (because C allows to do many nasty things). This is a place for a code guard and peer reviews.

  • @WillD-jj9kg
    @WillD-jj9kg Před 6 měsíci +5

    I just write straight to the transformer with a pin

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

      Yup. I manually drag the electrons through the circuitry of the board to run all my programs.

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

    Japanese Game Developers in the 80s: You can tell what your code does by looking at it?

  • @homematvej
    @homematvej Před 6 měsíci +11

    Yeah it's a skill issue.
    I can spend hours looking how a new structure compiles and behaves before I start using it.
    You just not supposed to use in c++ something you don't understand how it compiles and works.

    • @JNelson_
      @JNelson_ Před 6 měsíci +1

      Sometimes you are in a codebase too big to understand before you start debugging, or it's infeasible, the last place I worked just the section of code my team handled was 8 million lines of C and C++

    • @wiczus6102
      @wiczus6102 Před 6 měsíci

      Have fun working on a large project with a huge code-base then. Have fun having to understand the whole code base before you make a change.
      You seem like a guy who's only ever worked on his unreal demo project.
      If a collegue gives you a hammer and it turns out to be a screwdriver you're going to waste so much time for nothing. And that time costs money for the company.

    • @homematvej
      @homematvej Před 6 měsíci

      @@wiczus6102 I always understand the whole system before making changes no matter how big the codebase is, it's never more than 3 days. If your team is unable to make the right abstractions it's a skill issue. And it will result in bug fixing taking more than 5% of your teams time.

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

      He can tell you what each line does, but he'll have to stare at the code for an extra 6 hours to figure out what the program itself is doing.

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

      @@wiczus6102 And in this case C++ may be a great tool for responsible developers. I've spent a lot of time rescuing big and "doomed" projects by introducing correct design patterns (which took time but in the long run it gave a lot of benefits to the company).

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

    At that point just use assembly then

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

    When i first read about operator overloading i thought it was great. I immediately thought of things like a complex number library where it makes perfect sense to overload your basic math operations. Then my roommate started to describe some of the horror stories he'd seen where the overloaded operations don't make sense or are counter intuitive.
    I still think it has a place but programmers really need to make an effort to only use it when it makes sense.

  • @jefferymuter4659
    @jefferymuter4659 Před 6 měsíci

    I graduated from a programming bootcamp and got a pretty jr job as a front end dev. It wasnt the dream job but it lets me get paid to look at code all day. And I have started to scrape some time together to work on side projects and learn some weird stuff now too. I want to understand the OS better and have a way deeped understanding of computers and the true fundamentals of how programming works in a way a 4 month bootcamp could never teach. Hopefully in a year or so i can get promoted to the job i want, or find something that checks all the boxes for me.

  • @nroos2043
    @nroos2043 Před 7 měsíci +12

    i thought he was talking ab bra size

    • @JS-mg8no
      @JS-mg8no Před 7 měsíci +7

      This man knows nothing of the sorts

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

      Even A can be pretty nice, you could think GGs are good but they are way too impractical!

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

    C++ has the worst syntax of any language not deliberately designed that way as a joke.
    Rust has the worst semantics of any language not deliberately designed that way as a joke.

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

    Ok that example of operator overloading is so fucking extreme 😂

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

    "the f**in minus sign can do heap allocations"
    Preach!!

  • @carl_84
    @carl_84 Před 6 měsíci +18

    I don't like C++ because in some scenarios different compilers or different language versions behave differently. To me, C++ seems like a language that was patched way too many times while trying to have backwards compatibility.
    Then you add on top libraries like Boost and QT that add another level of complexity.
    Seems like there's no real standard library, even for basic types like a string, there are way too many types. Like QString, std::string, char *, wchar_t *, etc, etc, etc. it's really annoying on a large code base.

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

      std::string

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

      I mean, C does that too to a much smaller degree, but I agree. The "different compilers do different things" is 99% "MSVC is doing it's own thing again and everyone else is following the C standard and building C++ on top of it as the standard intended." ISTG, MSVC supports 0% of the C changes after C89 or so.

    • @sinom
      @sinom Před 6 měsíci

      ​@@__Brandon__std::string_view

    • @captainfordo1
      @captainfordo1 Před 6 měsíci

      struct String
      {
      char *str;
      u64 len;
      }

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

      Char* and wchar_t* are classic C strings.
      Wchar is 2 byte Unicode or something like that.
      There's also std::wstring if you need Unicode.

  • @koiledPythonRain
    @koiledPythonRain Před 6 měsíci +9

    "I don't like cpp because i don't like the features it adds that i am not required to use, i want to manipulate data in an unshielded and non-standardized way" sounds like an ego problem

  • @eps-nx8zg
    @eps-nx8zg Před 6 měsíci

    that's why I have begun to really like rust, it has all the nice things like modules, generics, metaprogramming and it's much more readable and comprehensible than a lot of c++ libraries. Only problem is the borrow checker and unsafe rust and all the weird experimental stuff with allocators in containers and not really letting you do your own heap allocations very easily. Every little subset of rust is like a completely different language, you got rust, unsafe rust, macros, proc macros, async rust, toml, and the list just goes on. I always end up going back to c++ because to me writing in c is a waste of time because of the lack of generics and containers and stuff.

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

    Yeah but I don't want to need to know exactly what is going on in the operating system, I need to write code that does what I want to do, I don't need to know how it does it, just that it does what it does lol

  • @elementkingaming1947
    @elementkingaming1947 Před 6 měsíci +9

    His c++ problems sound more like a skill issue. Like if the first learnt c++ instead of c, he would be saying the exact same thing but about c

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

      Nah. I've used C++ for a long time and just started using C. I like C a lot better. Sure, I miss some C++ features, but C makes much more sense to me.

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

      I've learned 6502 and x86 and C before c++ (and after that ada95, java, c#, python and many more) and when I have a choice C vs C++ I ALWAYS choose C++ (even on microcontrollers). It's simple: even if I don't need (or cannot use) specific c++ feature I got it's type safety (well, maybe it's not perfect but it at least exists).

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

    This is the own dck sucking issue.
    99.9% of programmers don't need to know exactly how/where the memory is allocated. Otherwise go for assembly if you just want to show off.
    A higher level of abstraction allows the code to be understandable, and you can still look at the implementation of the language/compiler/whatever if you really need to.

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

      He's saying it's simpler, not better. He says that C++ has so many crazy things happening that he won't always know what's going on. C doesn't have all that craziness, and this is simpler to work with.

    • @Obscurite1221
      @Obscurite1221 Před 6 měsíci +15

      @@Xevion You will never need to know what the operating system is doing unless you're working on optimization or drivers/onboard software.

    • @Xevion
      @Xevion Před 6 měsíci

      @@Obscurite1221 who said operating system? We're talking about normal programming. C++ syntax gets complicated, fast. C doesn't.

    • @marcs9451
      @marcs9451 Před 6 měsíci +1

      you sound like you never worked on an embedded system, game or any performant software. Being able to know the flow of resource allocation does **not** reduce expressiveness. Using custom allocators you get a lot of control and a lot of convenience, C and C++ were poorly designed by having one global allocator and no defer keyword and EVEN THEN you can still reap the benefits of using one.

    • @dubvascl5840
      @dubvascl5840 Před 6 měsíci

      ​@@marcs9451ah yes, that only one allocator in C called operating system

  • @johneric2720
    @johneric2720 Před 6 měsíci

    I really love C.
    It was the first language I learned.
    I love it because, when writing an application, you start from the basics, doing everything until you create complex software; this helps develop the programmer's knowledge. Unlike others, which have some pre-made functionalities, what you do next is pick and use.
    Although I love Python and JavaScript!

  • @quickscopesheep5994
    @quickscopesheep5994 Před 6 měsíci

    Operator overloading is actually the reason i don’t want to switch to c. Working with maths libraries a lot comes in quite handy

  • @emmafountain2059
    @emmafountain2059 Před 6 měsíci +11

    C for low-level control, python for high-level abstraction. In my (admittedly limited) experience c++ tries to give both low-level control and high-level abstraction which leads to messy code that spans too many levels of abstraction at once

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

      You have just as much low level control in C++ as you’d have in C. C++ can be messy, sure. But so can C be. Just enforce coding standards in your team and you’ll be fine.

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

      i can see your experience is limited cause youre yapping absolute bs. c++ gives you a high level of low level control and good mid-level (wouldnt call it high level at all) abstraction. understand how simple continuous and non continuous memory works and suddenly understanding how a vector works isnt such a big deal

    • @mynameisjeff9124
      @mynameisjeff9124 Před 6 měsíci

      Python is one of the shittiest languages out there

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

      @@martijn3151 "Just enforce coding standards"
      YES. This is the correct way of handling mess in teams.

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

    Solution: read a C++ book.

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

    Now tell me what a single line does after you build a system and start using it. Abstraction is but a necessary side effect of leveraging larger systems, and it's your job as a developer to handle that. Also obligatory "freedom to do bad things in a language doesn't make it bad, it just let's the developer be bad"

  • @Link-channel
    @Link-channel Před 2 měsíci

    Check for "Keith", the C++ mascot. 😂😂😂

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

    Dude really said “I don’t like C++. It’s not low-level enough”

    • @salarsan12
      @salarsan12 Před 6 měsíci +1

      My man, this is literally the reason why people prefer c++ over c# or java, cause you have more control over the memory management.

    • @egg-mv7ef
      @egg-mv7ef Před 6 měsíci +2

      nah u misintepreted the video. he actually said "im too dumb to understand c++ so i cope and say C is better"

    • @natescode
      @natescode Před 6 měsíci

      ​@@egg-mv7efnope egghead

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

    Language readability is only one aspect of several factors you should consider when choosing a language.

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

      yes, but it is a pretty important one.

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

    You can use C++ just as a better C if you like. Have to be careful not to pull in too much overhead though. Typically applications where C is the best choice want to be lean. In the end, just choose the best tool for the job at hand.

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

      Yes. As you do not pay ANY price for not used c++ features you can use it as a better C - even on microcontrollers (of course 95% features would not be available nor reasonable, but at least you get a lot of type safety forced by a compiler).

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

    These languages like C++ have a context problem where you have to follow much more code to understand it. Languages like Go or C don't have this problem to the same extent because they limit their semantics a lot so that it becomes a lot clearer what is actually happening in any given place.

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

    Yeah, I remember a professor in my time (early 1990) at the University who was adamantly agains using computers to calculate math models. His point was you should only use logarithmic ruler b/c he didn't understand how to use computers to do that. So, the fact that you don't understand C++ and don't like it - means only one thing - that you don't understand C++ and therefor don't like it.

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

    100% a skill issue, but C++ is absolutely absurd.

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

      Some of it: yes. But you have a choice and do not need to use ANY of possible C++ construct in a one method :D

  • @montichitinti8814
    @montichitinti8814 Před 14 dny

    I think function overload as well as operator overload they are just there to give a language user the ability to define their own custom functionality also expand functionality of what is given from the library, where by, without overloading you can only use a library function exactly as the library describe its use. My undeerstanding is, overloading means more power to the user

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

    It's just a matter of what you want to do. Sometimes having the object oriented logic is way easier to solve a problem

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

    No offense but this is probably your worst take.

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

      A man can't prefer one language because it has less abstractions than the other? I don't get why this discussion is so controversial

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

    C is my fav for the same reason, I can design everything up to 4 bytes of accuracy.

    • @martinprochazka3714
      @martinprochazka3714 Před 6 měsíci +1

      What does that even mean? 😅

    • @henrykkaufman1488
      @henrykkaufman1488 Před 6 měsíci

      @@martinprochazka3714 it means I can predict how much memory will my program take

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

      And what can you do with C which you cannot with C++?

  • @SamudrarajOfficial
    @SamudrarajOfficial Před 6 měsíci

    I specifically like operator overloading and one of the main reasons why i learnt c++

  • @SaHaRaSquad
    @SaHaRaSquad Před 6 měsíci

    That's why I'm currently a bit torn about Rust. It's a fantastic language but many people (and thus libraries) make heavy use of the abstraction features and macros which can lead to a lot of difficult to understand code and near unreadable annotations.
    Complex features may be optional but using a simpler language in the first place seems better.

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

    "This is taking a pointer, it's looking four bytes ahead and putting a value there." What? That explanation doesn't make any sense. Four bytes ahead of what? Do you mean the offset of 'start' into the struct? Are you just assuming a 32-bit environment? I don't actually know if what you said is correct or not. Not enough information here.

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

      ​​@@ITSecNEOI don't understand anything. Is there a terminology book you recommend about what are the most common terms that come up over and over again and what they mean for each type of language.

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

    Take 5 separate C++ programmers and it'll be like reading 5 different dialects. Honestly they're better off doing a complete rewrite of the language instead of littering the language with more features to keep up with newer technologies.

    • @natescode
      @natescode Před 6 měsíci

      Zig hopefully could be the replacement. Granted it is more of a C replacement

  • @strider5245
    @strider5245 Před 8 dny

    The thing that always crosses my mind is that. Why haven't someone wrote a book about all the possible problems that faced C developers.
    ex of a problem/solution:
    Problem: Taking an int as input from the user to access an array index, and that number points somewhere out of bound
    solution: if (userIntInput >= arrayLength) return;

  • @alisoltani5636
    @alisoltani5636 Před 6 měsíci

    I am glad I'm not alone in that

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

    I can tell you what every line is doing in python down to the byte level but i actually like to get work done instead of using an autistically verbose language

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

    I've had a problem like that. When I bramched out of C++ into Python it was really confusing because I couldn't see past what Python abstracts away.

  • @arcanernz
    @arcanernz Před 6 měsíci

    Meta programming with templates and macros with a bit of operator overloading can enable you to create your own language.

  • @Barquevious_Jackson
    @Barquevious_Jackson Před 6 měsíci +1

    Why are you switching between writing it as "C++" and "C plus plus" in the subtitles. Egads. My editor brain yells. It must coorect.

  • @thejackimonster9689
    @thejackimonster9689 Před 20 dny

    100% agree. I personally like writing my own C++ code. But the moment you touch other peoples code, I definitely prefer C over C++ every time. The code is just much more readable even if it's more verbose.