Do You Like C or C++ More ?

Поділитися
Вставка
  • Опубліковано 18 лис 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
  • Наука та технологія

КОМЕНТАРІ • 1 тис.

  • @norhamsfinest9761
    @norhamsfinest9761 6 місяців тому +3903

    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_ 6 місяців тому +89

      Ding ding ding ding!

    • @sacredgeometry
      @sacredgeometry 6 місяців тому +179

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

    • @maciejprokop2001
      @maciejprokop2001 6 місяців тому +7

      Yeah o think you're right man !

    • @sqrt7956
      @sqrt7956 6 місяців тому +11

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

    • @SkyyySi
      @SkyyySi 6 місяців тому +39

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

  • @happyfase
    @happyfase 6 місяців тому +3266

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

    • @mdev790
      @mdev790 6 місяців тому +104

      Not macros but more like templates

    • @homelessrobot
      @homelessrobot 6 місяців тому +148

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

    • @NimerionTech
      @NimerionTech 6 місяців тому +12

      @@homelessrobot go binary then.

    • @homelessrobot
      @homelessrobot 6 місяців тому +51

      @@NimerionTech binary isn't a programming language

    • @tsunamio7750
      @tsunamio7750 6 місяців тому +36

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

  • @ISKLEMMI
    @ISKLEMMI 6 місяців тому +1424

    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 6 місяців тому +21

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

    • @captainfordo1
      @captainfordo1 6 місяців тому +48

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

    • @KanashimiMusic
      @KanashimiMusic 6 місяців тому +2

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

    • @NinjaRunningWild
      @NinjaRunningWild 6 місяців тому +1

      Have to?

    • @Dremth
      @Dremth 6 місяців тому +11

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

  • @nicholasfreitas8662
    @nicholasfreitas8662 6 місяців тому +219

    never show this man python

    • @finalformluigi
      @finalformluigi Місяць тому +25

      For real lmao. Python is the pinnacle of abstraction!

    • @julian_handpan
      @julian_handpan Місяць тому +4

      @@finalformluigilol you don’t know ruby 😂

    • @finalformluigi
      @finalformluigi Місяць тому +4

      @@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 Місяць тому +1

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

    • @finalformluigi
      @finalformluigi Місяць тому +2

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

  • @reynoldskynaston9529
    @reynoldskynaston9529 6 місяців тому +553

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

    • @natescode
      @natescode 6 місяців тому +19

      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 5 місяців тому +9

      Hence why C hits the sweet spot for me.

    • @fr89k
      @fr89k 5 місяців тому +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 4 місяці тому +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 4 місяці тому +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.

  • @bobson_dugnutt
    @bobson_dugnutt 6 місяців тому +1118

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

    • @phusicus_404
      @phusicus_404 5 місяців тому +45

      "As-if" principle

    • @WillD-jj9kg
      @WillD-jj9kg 5 місяців тому +12

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

    • @koiledPythonRain
      @koiledPythonRain 5 місяців тому +29

      Excactly. This seems like an ego problem

    • @pyrus2814
      @pyrus2814 5 місяців тому +33

      You seriously overestimate how much the compiler actually does.

    • @scr4932
      @scr4932 5 місяців тому +17

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

  • @3KLANGMUSIC
    @3KLANGMUSIC 6 місяців тому +56

    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.

  • @karansethia1037
    @karansethia1037 6 місяців тому +662

    That one guy at every hackathon

    • @user-hl3qv8qg2s
      @user-hl3qv8qg2s 5 місяців тому +36

      imagine this guy talking to women. lmao

    • @Cobalt985
      @Cobalt985 5 місяців тому

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

    • @HeyIntegrity
      @HeyIntegrity 5 місяців тому +10

      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 5 місяців тому +15

      I think both​@@HeyIntegrity

    • @Dom-zy1qy
      @Dom-zy1qy 2 місяці тому +17

      ​@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 6 місяців тому +1022

    "'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 6 місяців тому +518

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

    • @Omsip123
      @Omsip123 6 місяців тому +4

      👍

    • @EmptyJarDoto
      @EmptyJarDoto 6 місяців тому +94

      Yeah that logic is so cringe.

    • @natescode
      @natescode 6 місяців тому +75

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

    • @natescode
      @natescode 6 місяців тому +20

      ad absurdum.

  • @giannismentz3570
    @giannismentz3570 6 місяців тому +201

    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 6 місяців тому +14

      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 6 місяців тому +67

      @@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 6 місяців тому +1

      exactly

    • @alish2001
      @alish2001 6 місяців тому +9

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

    • @BigJMC
      @BigJMC 6 місяців тому +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 6 місяців тому +79

    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 6 місяців тому +4

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

    • @egg-mv7ef
      @egg-mv7ef 6 місяців тому +13

      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 6 місяців тому +13

      ​@@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 6 місяців тому

      @@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 5 місяців тому +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.

  • @zonea4860
    @zonea4860 6 місяців тому +448

    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 6 місяців тому +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 6 місяців тому

      ​@@mage3690would vim solve this?

    • @vinylSummer
      @vinylSummer 6 місяців тому

      ​@@mage3690just use Linux

    • @Templarfreak
      @Templarfreak 6 місяців тому +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 6 місяців тому

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

  • @rachit7645
    @rachit7645 6 місяців тому +297

    Obligatory skill issue

    • @douwehuysmans5959
      @douwehuysmans5959 6 місяців тому +23

      Oh god, the zoomers are starting to join the workforce

    • @wiczus6102
      @wiczus6102 6 місяців тому

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

    • @TheALPHA1550
      @TheALPHA1550 Місяць тому

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

  • @CrittingOut
    @CrittingOut 6 місяців тому +7

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

    • @jasonenns5076
      @jasonenns5076 6 місяців тому +2

      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.

  • @renato360a
    @renato360a 6 місяців тому +21

    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.

  • @mintx1720
    @mintx1720 6 місяців тому +10

    rust can also heap allocate with the minus sign lmao

  • @afj810
    @afj810 2 місяці тому +3

    At that point just use assembly then

  • @BeeboHamido
    @BeeboHamido 4 місяці тому +58

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

    • @monkeibusiness
      @monkeibusiness 2 місяці тому +21

      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 Місяць тому +4

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

    • @johnver9245
      @johnver9245 8 днів тому +1

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

  • @Lord_zeel
    @Lord_zeel 4 місяці тому +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.

  • @codelapiz
    @codelapiz 5 місяців тому +71

    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 5 місяців тому +2

      csharp is like lego

    • @guxershmeg
      @guxershmeg 3 місяці тому +4

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

    • @sporksto4372
      @sporksto4372 2 місяці тому +4

      As a C# fan, this is so accurate.

    • @adialwaysup8184
      @adialwaysup8184 2 місяці тому

      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 15 днів тому +1

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

  • @lonelyshpee7873
    @lonelyshpee7873 6 місяців тому +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 6 місяців тому +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 6 місяців тому +2

      INTRUDER ALERT! A RED SPY IS IN THE BASE!

    • @cmxpotato
      @cmxpotato 6 місяців тому +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 6 місяців тому

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

    • @mynameisjeff9124
      @mynameisjeff9124 6 місяців тому

      ⁠@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.

  • @muvoksismakings
    @muvoksismakings 6 місяців тому +33

    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 6 місяців тому +41

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

    • @qorso
      @qorso 6 місяців тому +2

      it pretty 😍

    • @Drummerx04
      @Drummerx04 6 місяців тому +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 6 місяців тому +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 5 місяців тому +3

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

  • @arakwar
    @arakwar 6 місяців тому +25

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

    • @natescode
      @natescode 6 місяців тому

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

    • @dumdum7099
      @dumdum7099 2 місяці тому +2

      Listening comprehension zero. You.

  • @platin2148
    @platin2148 6 місяців тому +170

    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 6 місяців тому +16

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

    • @clementlebeau484
      @clementlebeau484 6 місяців тому +11

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

    • @platin2148
      @platin2148 6 місяців тому +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 6 місяців тому +6

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

    • @platin2148
      @platin2148 6 місяців тому +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.

  • @seanhollibaugh3776
    @seanhollibaugh3776 6 місяців тому +9

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

    • @martinprochazka3714
      @martinprochazka3714 5 місяців тому

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

  • @Klosterhasi
    @Klosterhasi 6 місяців тому +255

    "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 6 місяців тому +47

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

    • @ViolentFury1
      @ViolentFury1 5 місяців тому

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

    • @BigBoss0112
      @BigBoss0112 5 місяців тому +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 5 місяців тому +6

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

    • @SeeMyDolphin
      @SeeMyDolphin 5 місяців тому +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.

  • @AxelStrem
    @AxelStrem 6 місяців тому +64

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

    • @bies_moron4404
      @bies_moron4404 5 місяців тому

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

    • @AxelStrem
      @AxelStrem 3 місяці тому +4

      @@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 27 днів тому

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

  • @neerajn376
    @neerajn376 6 місяців тому +4

    bruh he literally said skill issue, im dying LMAOO

  • @duckenjoyer13
    @duckenjoyer13 5 місяців тому +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...

  • @aliendroid8174
    @aliendroid8174 6 місяців тому +4

    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 Місяць тому +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.

  • @mu11668B
    @mu11668B Місяць тому +5

    I didn't know I wasn't alone.

  • @emstallz1781
    @emstallz1781 6 місяців тому +96

    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 6 місяців тому +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 6 місяців тому +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 6 місяців тому

      @@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 6 місяців тому +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 6 місяців тому +15

      @@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 :)

  • @fr89k
    @fr89k 5 місяців тому +55

    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 3 місяці тому +5

      Can you say that in clash royale terms 😖

    • @mycelia_ow
      @mycelia_ow 2 місяці тому

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

    • @fr89k
      @fr89k 2 місяці тому +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 2 місяці тому

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

    • @fr89k
      @fr89k 2 місяці тому

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

  • @mobslicer1529
    @mobslicer1529 6 місяців тому +3

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

  • @gerarddip
    @gerarddip 3 дні тому +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.

  • @asmithgames5926
    @asmithgames5926 2 місяці тому +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 Місяць тому +2

      This requires decent programmers though :D

    • @asmithgames5926
      @asmithgames5926 Місяць тому

      @@PiotrPilinko Decent programming normally does.

  • @DaFrancc
    @DaFrancc 3 місяці тому +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 Місяць тому

      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 5 місяців тому +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 5 місяців тому +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 5 місяців тому +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 5 місяців тому

      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 5 місяців тому +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 5 місяців тому

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

  • @joshnjoshgaming
    @joshnjoshgaming 6 місяців тому +1

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

    • @joshnjoshgaming
      @joshnjoshgaming 6 місяців тому +1

      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

  • @hallrules
    @hallrules 6 місяців тому +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.

  • @FyberOptyk
    @FyberOptyk 6 місяців тому +8

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

    • @Phantom-lr6cs
      @Phantom-lr6cs Місяць тому

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

    • @PiotrPilinko
      @PiotrPilinko Місяць тому

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

  • @MrDaAsif
    @MrDaAsif 6 місяців тому +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 6 місяців тому

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

    • @MrDaAsif
      @MrDaAsif 6 місяців тому +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 5 місяців тому +2

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

    • @RetroAndChill
      @RetroAndChill 5 місяців тому

      @@ic6406 Move semantics is a good reason to

    • @PiotrPilinko
      @PiotrPilinko Місяць тому

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

  • @segueoyuri
    @segueoyuri 12 днів тому +1

    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

  • @y3v4d
    @y3v4d 6 місяців тому +2

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

  • @wattihrvolt-pn3pf
    @wattihrvolt-pn3pf 6 місяців тому +7

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

  • @TheRealJman87
    @TheRealJman87 6 місяців тому +11

    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 6 місяців тому

      Modern C++ makes me want to vomit.

    • @sinom
      @sinom 6 місяців тому +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 5 місяців тому

      Modern C++ is pure crap.

    • @fr89k
      @fr89k 5 місяців тому

      @@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 Місяць тому

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

  • @ZenCharlie
    @ZenCharlie 2 місяці тому +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.

  • @outlawfps3948
    @outlawfps3948 6 місяців тому +2

    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 Місяць тому

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

  • @____uncompetative
    @____uncompetative 6 місяців тому +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.

  • @anassqadil1376
    @anassqadil1376 6 місяців тому +15

    skill issue :/

  • @sherwinbangs
    @sherwinbangs 12 днів тому

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

  • @Salamaleikum80
    @Salamaleikum80 6 місяців тому +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.

  • @koiledPythonRain
    @koiledPythonRain 5 місяців тому +8

    "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

  • @matthewrichardson4435
    @matthewrichardson4435 6 місяців тому +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 5 місяців тому

      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 Місяць тому

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

  • @Dremth
    @Dremth 6 місяців тому +1

    Hint: you can program in C++ without using all of its features, and you also are not obligated to write dogshit code just because it's possible.

  • @dougbennett3013
    @dougbennett3013 3 дні тому

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

  • @nroos2043
    @nroos2043 6 місяців тому +12

    i thought he was talking ab bra size

    • @JS-mg8no
      @JS-mg8no 6 місяців тому +7

      This man knows nothing of the sorts

    • @gabrielbarrantes6946
      @gabrielbarrantes6946 6 місяців тому +2

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

  • @WillD-jj9kg
    @WillD-jj9kg 5 місяців тому +5

    I just write straight to the transformer with a pin

    • @Isawadigitalferrari
      @Isawadigitalferrari 4 місяці тому

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

  • @AkiiiMatcha
    @AkiiiMatcha 6 місяців тому

    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.

  • @GiuseppeGaetanoSabatelli
    @GiuseppeGaetanoSabatelli Місяць тому +1

    Basically, C is prettier bundled assembly.
    C++ is an actual programming language.

  • @emmafountain2059
    @emmafountain2059 6 місяців тому +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 6 місяців тому +3

      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 6 місяців тому +4

      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 6 місяців тому

      Python is one of the shittiest languages out there

    • @PiotrPilinko
      @PiotrPilinko Місяць тому

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

  • @homematvej
    @homematvej 6 місяців тому +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_ 6 місяців тому +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 6 місяців тому

      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 6 місяців тому

      @@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 6 місяців тому +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 Місяць тому

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

  • @philoldout7489
    @philoldout7489 Місяць тому +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 Місяць тому

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

  • @thejackimonster9689
    @thejackimonster9689 8 днів тому

    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.

  • @robertoprestigiacomo253
    @robertoprestigiacomo253 6 місяців тому +6

    Solution: read a C++ book.

  • @carl_84
    @carl_84 6 місяців тому +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__ 6 місяців тому +5

      std::string

    • @mage3690
      @mage3690 6 місяців тому +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 6 місяців тому

      ​@@__Brandon__std::string_view

    • @captainfordo1
      @captainfordo1 6 місяців тому

      struct String
      {
      char *str;
      u64 len;
      }

    • @zhulikkulik
      @zhulikkulik 6 місяців тому +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.

  • @jamesjamey8596
    @jamesjamey8596 12 днів тому

    Yess! C is quite readable and understandable. But Cpp has so many variants and features that each project is effectively written in it's own language. At least thats how I feel about it.

  • @roberteltze4850
    @roberteltze4850 5 місяців тому

    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.

  • @TheIncognitusMe
    @TheIncognitusMe 6 місяців тому +4

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

    • @PiotrPilinko
      @PiotrPilinko Місяць тому

      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

  • @elementkingaming1947
    @elementkingaming1947 6 місяців тому +8

    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 4 місяці тому +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 Місяць тому

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

  • @awesomedavid2012
    @awesomedavid2012 Місяць тому

    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.

  • @williamandre2984
    @williamandre2984 6 місяців тому +47

    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 6 місяців тому +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 6 місяців тому +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 6 місяців тому

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

    • @marcs9451
      @marcs9451 6 місяців тому +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 6 місяців тому

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

  • @haubro18
    @haubro18 6 місяців тому +4

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

    • @homelessrobot
      @homelessrobot 6 місяців тому +3

      yes, but it is a pretty important one.

  • @jefferymuter4659
    @jefferymuter4659 6 місяців тому

    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.

  • @TranscendentBen
    @TranscendentBen Місяць тому

    When I learned about operator overloading I could see where FORTRAN (the name was ALL CAPS when I learned it) has built-in overloaded operators. With INTEGER type, A ** B multiplies A by itself B times. With REAL, A ** B takes log of A, multiplies by B, then exponentiates the result.
    See, these languages are all the same ...

  • @po1sonseede9001
    @po1sonseede9001 5 місяців тому +5

    No offense but this is probably your worst take.

    • @ker0356
      @ker0356 27 днів тому

      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

  • @JakeFace0
    @JakeFace0 6 місяців тому +3

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

    • @salarsan12
      @salarsan12 6 місяців тому +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 6 місяців тому +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 6 місяців тому

      ​@@egg-mv7efnope egghead

  • @Linuxydable
    @Linuxydable 2 місяці тому

    It's the reason why I like program in C++ Orthodox for game development.

  • @montichitinti8814
    @montichitinti8814 2 дні тому

    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

  • @WoWUndad
    @WoWUndad 6 місяців тому +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

  • @svarodzic
    @svarodzic 6 місяців тому +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.

    • @listeriohollow7421
      @listeriohollow7421 6 місяців тому +2

      He knows cpp

    • @homelessrobot
      @homelessrobot 6 місяців тому +2

      You can understand a complex thing and still despise the complexity.

  • @ViviBuchlaw
    @ViviBuchlaw 22 дні тому

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

  • @arthur-vi1ub
    @arthur-vi1ub 6 місяців тому

    Amen to that !!!!! Totally share this opinion. I don't understand what the duck is going on when I write C++. When I write C it's unsafe code, but at least It's consistently unsafe and I know where and why 😂

  • @henrykkaufman1488
    @henrykkaufman1488 6 місяців тому +3

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

    • @martinprochazka3714
      @martinprochazka3714 5 місяців тому +1

      What does that even mean? 😅

    • @henrykkaufman1488
      @henrykkaufman1488 5 місяців тому

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

    • @PiotrPilinko
      @PiotrPilinko Місяць тому

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

  • @Spirrwell
    @Spirrwell 5 місяців тому +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 5 місяців тому

      ​​@@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.

  • @tanchwa3740
    @tanchwa3740 6 місяців тому +1

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

  • @xt3rm1nat0r8
    @xt3rm1nat0r8 Місяць тому

    Exactly why I like C. Another reason is coz I learnt C first, and data structures algorithms, operating systems, networking and all in C language. So everything else feels like vague. I feel uncomfortable when I don't know what the function is gonna do exactly for any change I make.

  • @Izuhu
    @Izuhu 6 місяців тому +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 6 місяців тому

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

  • @ezkymos
    @ezkymos 5 місяців тому

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

  • @Link-channel
    @Link-channel Місяць тому

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

  • @teaser6089
    @teaser6089 5 місяців тому +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

  • @WesHampson
    @WesHampson Місяць тому

    I love C, strongly prefer it over C++, but I do wish C had classes occasionally, especially when I want to do operations that require setup and teardown. In C++ you can define, say, a ScopedSpinLock class that initializes and acquires a spin lock in the constructor and frees it in the destructor. Then, all you need to do is instantiate that class in your function and you’ve got a spin lock for the duration of that scope block.

    • @PiotrPilinko
      @PiotrPilinko Місяць тому

      You are allowed to use only selected subset of C++. Nobody's cannot punish you for that :D

  • @braedonwatkins967
    @braedonwatkins967 Місяць тому

    that's how i feel about a lot of more abstracted languages (i.e. python, JS) bc i can only reason about the abstractions. i can't make sense of what's really happening with the code i write.

  • @monkeywithocd
    @monkeywithocd 7 днів тому

    Yeah, I like C++ but I definitely use it in a more C-first sort of way. It definitely overcomplicates a lot of things but things like classes are just way too useful for keeping code organized and not messy.

  • @CallmeSamy
    @CallmeSamy 6 місяців тому

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

  • @kirasmith1147
    @kirasmith1147 4 місяці тому +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"

  • @SloppyPuppy
    @SloppyPuppy 2 місяці тому

    Exactly, STL has way too much abstractiom that you cant even begin to imagine whats happening under the hood, and Im really having trouble forcing myself to memorize the custom syntax for those layers of abstraction. I really gotta buckle down and learn it, so I can stop bothering with it, I dont ever write rust, but I know I should.

  • @skryfall
    @skryfall 3 місяці тому +1

    Honestly I liked C more as well until I was forced to use C++. Having used C++ for the last 3 years every single day changed my mind, I really like some of the features that C++ has like smart pointers.

  • @johneric2720
    @johneric2720 6 місяців тому

    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!

  • @SpicyMelonYT
    @SpicyMelonYT Місяць тому

    That’s wild because I came from c#. Then started going c++. And it was so wild to now finally see what the code is actually doing. And here this guy is saying c is like that but actually. He’s not wrong but from my perspective it’s so wild to hear this. I’m now expecting someone that codes in machine code to dislike c cause it abstracts away what’s actually happening lol

    • @arkeynserhayn8370
      @arkeynserhayn8370 Місяць тому

      Frankly, c is the bottom of it, once you read generated assembly file enough, you can guess what compiler is going to omit . . . When not optimizing (ie -O0), optimisations are in its own league...