Do You Like C or C++ More ?

Поделиться
HTML-код
  • Опубликовано: 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,2 тыс.

  • @norhamsfinest9761
    @norhamsfinest9761 8 месяцев назад +4734

    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_ 8 месяцев назад +111

      Ding ding ding ding!

    • @sacredgeometry
      @sacredgeometry 8 месяцев назад +220

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

    • @maciejprokop2001
      @maciejprokop2001 8 месяцев назад +7

      Yeah o think you're right man !

    • @sqrt7956
      @sqrt7956 7 месяцев назад +15

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

    • @SkyyySi
      @SkyyySi 7 месяцев назад +46

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

  • @happyfase
    @happyfase 8 месяцев назад +4013

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

    • @mdev790
      @mdev790 8 месяцев назад +132

      Not macros but more like templates

    • @homelessrobot
      @homelessrobot 8 месяцев назад +187

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

    • @NimerionTech
      @NimerionTech 7 месяцев назад +14

      @@homelessrobot go binary then.

    • @homelessrobot
      @homelessrobot 7 месяцев назад +79

      @@NimerionTech binary isn't a programming language

    • @tsunamio7750
      @tsunamio7750 7 месяцев назад +49

      @@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 8 месяцев назад +1882

    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 8 месяцев назад +29

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

    • @captainfordo1
      @captainfordo1 8 месяцев назад +60

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

    • @KanashimiMusic
      @KanashimiMusic 8 месяцев назад +4

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

    • @NinjaRunningWild
      @NinjaRunningWild 8 месяцев назад +1

      Have to?

    • @Dremth
      @Dremth 7 месяцев назад +11

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

  • @reynoldskynaston9529
    @reynoldskynaston9529 8 месяцев назад +775

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

    • @natescode
      @natescode 7 месяцев назад +32

      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 7 месяцев назад +15

      Hence why C hits the sweet spot for me.

    • @fr89k
      @fr89k 7 месяцев назад +14

      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 6 месяцев назад +4

      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 6 месяцев назад +2

      @@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 7 месяцев назад +1573

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

    • @phusicus_404
      @phusicus_404 7 месяцев назад +64

      "As-if" principle

    • @WillD-jj9kg
      @WillD-jj9kg 7 месяцев назад +22

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

    • @koiledPythonRain
      @koiledPythonRain 7 месяцев назад +48

      Excactly. This seems like an ego problem

    • @pyrus2814
      @pyrus2814 7 месяцев назад +49

      You seriously overestimate how much the compiler actually does.

    • @scr4932
      @scr4932 7 месяцев назад +27

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

  • @CrittingOut
    @CrittingOut 8 месяцев назад +44

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

    • @jasonenns5076
      @jasonenns5076 8 месяцев назад +10

      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.

  • @lukewatson8848
    @lukewatson8848 7 месяцев назад +1254

    "'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 7 месяцев назад +617

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

    • @Omsip123
      @Omsip123 7 месяцев назад +7

      👍

    • @EmptyJarDoto
      @EmptyJarDoto 7 месяцев назад +109

      Yeah that logic is so cringe.

    • @natescode
      @natescode 7 месяцев назад +97

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

    • @natescode
      @natescode 7 месяцев назад +29

      ad absurdum.

  • @nicholasfreitas8662
    @nicholasfreitas8662 7 месяцев назад +507

    never show this man python

    • @finalformluigi
      @finalformluigi 3 месяца назад +72

      For real lmao. Python is the pinnacle of abstraction!

    • @julian_handpan
      @julian_handpan 3 месяца назад +11

      @@finalformluigilol you don’t know ruby 😂

    • @finalformluigi
      @finalformluigi 3 месяца назад +12

      @@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 3 месяца назад +2

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

    • @finalformluigi
      @finalformluigi 3 месяца назад +4

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

  • @sinom
    @sinom 8 месяцев назад +96

    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 8 месяцев назад +5

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

    • @egg-mv7ef
      @egg-mv7ef 7 месяцев назад +18

      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 7 месяцев назад +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 7 месяцев назад +1

      @@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 7 месяцев назад +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.

  • @karansethia1037
    @karansethia1037 8 месяцев назад +774

    That one guy at every hackathon

    • @user-hl3qv8qg2s
      @user-hl3qv8qg2s 7 месяцев назад +40

      imagine this guy talking to women. lmao

    • @Cobalt985
      @Cobalt985 7 месяцев назад

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

    • @HeyIntegrity
      @HeyIntegrity 7 месяцев назад +15

      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 6 месяцев назад +18

      I think both​@@HeyIntegrity

    • @Dom-zy1qy
      @Dom-zy1qy 4 месяца назад +30

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

  • @StupidusMaximusTheFirst
    @StupidusMaximusTheFirst 8 месяцев назад +293

    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 8 месяцев назад +23

      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.

    • @StupidusMaximusTheFirst
      @StupidusMaximusTheFirst 8 месяцев назад +83

      @@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 8 месяцев назад +1

      exactly

    • @alish2001
      @alish2001 8 месяцев назад +10

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

    • @BigJMC
      @BigJMC 7 месяцев назад +8

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

  • @joshnjoshgaming
    @joshnjoshgaming 8 месяцев назад +12

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

    • @joshnjoshgaming
      @joshnjoshgaming 8 месяцев назад +3

      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

  • @zonea4860
    @zonea4860 8 месяцев назад +469

    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 8 месяцев назад +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 8 месяцев назад

      ​@@mage3690would vim solve this?

    • @vinylSummer
      @vinylSummer 8 месяцев назад

      ​@@mage3690just use Linux

    • @Templarfreak
      @Templarfreak 8 месяцев назад +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 8 месяцев назад

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

  • @mu11668B
    @mu11668B 3 месяца назад +13

    I didn't know I wasn't alone.

  • @awesomedavid2012
    @awesomedavid2012 3 месяца назад +2

    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.

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

    "C++ makes it harder to shoot yourself in the foot, but when you do, you'll blow your whole leg off"

  • @neerajn376
    @neerajn376 7 месяцев назад +10

    bruh he literally said skill issue, im dying LMAOO

  • @aliendroid8174
    @aliendroid8174 8 месяцев назад +9

    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 3 месяца назад +2

      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.

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

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

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

      C++ is very efficient

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

      @@mightymalakai hmmm, then which operating systems have moved onto a C++ foundation from C? You can claim potential development efficiency gains. I’m referring to runtime performance.

  • @BeeboHamido
    @BeeboHamido 6 месяцев назад +83

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

    • @monkeibusiness
      @monkeibusiness 4 месяца назад +35

      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 3 месяца назад +11

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

    • @johnver9245
      @johnver9245 2 месяца назад +14

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

    • @michaelburggraf2822
      @michaelburggraf2822 16 дней назад

      I love watching the wave functions.

    • @fugyamom
      @fugyamom 10 дней назад

      That's what the rip register on x86 asm is for you dingleberry

  • @Lord_zeel
    @Lord_zeel 6 месяцев назад +10

    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.

    • @PixLgams
      @PixLgams 7 дней назад +2

      You can achieve a lot of that with libraries, though.
      Python is actually a good case study here: If you listen to some of the developer's talks or read through their PEPs, you'll notice that in it's basic form, Python is not much more complex than C. Python's developers have added a lot of well thought out syntactic sugar to the language though upon which it's interpreter/JIT compiler can pick up (e.g. notice how Python's class methods always require you to give a "self" parameter while most other languages don't). That combined with it's vast standard library ranging from common data structures to full-on HTTP networking and multiprocessing however has made the language incredibly convenient to use, even if the base language is pretty weird compared to most others.
      If C had a standard libary as expansive as Python's, it would probably be a lot more popular. If you added Python's absurd amount of syntactic sugar to it... you'd basically get C++.

  • @3KLANGMUSIC
    @3KLANGMUSIC 8 месяцев назад +95

    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 Месяц назад +1

      😂😂😂

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

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

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

      Don't worry I'm a C++ dev myself for years, and I wanted to test Unreal Engine one day (without using Blueprints, so only using real coding with C++) and I quickly quited lol
      Unreal Engine C++ is like a new language by itself, everything from the original C++ is different, UE built their own garbage collector, they have built their own smart pointers, their own defines etc...
      It's liking learning a new language from scratch tbh.

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

      ​@@K3rhosMan, imagine what the source code for something like Ark Survival Evolved looks like then... Pure spaghett.

    • @mattmurphy7030
      @mattmurphy7030 23 дня назад

      @@K3rhosyou’re a piss poor c++ dev if you found unreal c++ complicated. It’s an extremely restricted subset of C++.

  • @mintx1720
    @mintx1720 7 месяцев назад +12

    rust can also heap allocate with the minus sign lmao

  • @muvoksismakings
    @muvoksismakings 8 месяцев назад +41

    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 8 месяцев назад +45

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

    • @qorso
      @qorso 8 месяцев назад +2

      it pretty 😍

    • @Drummerx04
      @Drummerx04 8 месяцев назад +16

      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 8 месяцев назад +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 7 месяцев назад +3

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

  • @codelapiz
    @codelapiz 7 месяцев назад +78

    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 6 месяцев назад +3

      csharp is like lego

    • @guxershmeg
      @guxershmeg 5 месяцев назад +7

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

    • @sporksto4372
      @sporksto4372 4 месяца назад +6

      As a C# fan, this is so accurate.

    • @adialwaysup8184
      @adialwaysup8184 3 месяца назад

      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 2 месяца назад +1

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

  • @platin2148
    @platin2148 8 месяцев назад +176

    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 8 месяцев назад +18

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

    • @clementlebeau484
      @clementlebeau484 8 месяцев назад +12

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

    • @platin2148
      @platin2148 8 месяцев назад +17

      @@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 8 месяцев назад +7

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

    • @platin2148
      @platin2148 8 месяцев назад +3

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

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

    C++ the first bloat code with libraries that magically multiplied the assembly code base by a factor of ten.

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

    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.

  • @rachit7645
    @rachit7645 8 месяцев назад +327

    Obligatory skill issue

    • @douwehuysmans5959
      @douwehuysmans5959 8 месяцев назад +28

      Oh god, the zoomers are starting to join the workforce

    • @wiczus6102
      @wiczus6102 8 месяцев назад

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

    • @TheALPHA1550
      @TheALPHA1550 3 месяца назад

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

  • @arakwar
    @arakwar 8 месяцев назад +38

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

    • @natescode
      @natescode 7 месяцев назад +3

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

    • @dumdum7099
      @dumdum7099 4 месяца назад +3

      Listening comprehension zero. You.

  • @ZenCharlie
    @ZenCharlie 4 месяца назад +2

    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.

  • @Klosterhasi
    @Klosterhasi 8 месяцев назад +267

    "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 7 месяцев назад +51

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

    • @ViolentFury1
      @ViolentFury1 7 месяцев назад

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

    • @BigBoss0112
      @BigBoss0112 7 месяцев назад +38

      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 7 месяцев назад +8

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

    • @SeeMyDolphin
      @SeeMyDolphin 7 месяцев назад +8

      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.

  • @outlawfps3948
    @outlawfps3948 8 месяцев назад +5

    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 3 месяца назад +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.

  • @lonelyshpee7873
    @lonelyshpee7873 8 месяцев назад +30

    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 8 месяцев назад +9

      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 8 месяцев назад +3

      INTRUDER ALERT! A RED SPY IS IN THE BASE!

    • @cmxpotato
      @cmxpotato 8 месяцев назад +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 7 месяцев назад

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

    • @mynameisjeff9124
      @mynameisjeff9124 7 месяцев назад

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

  • @troglodytto
    @troglodytto 4 месяца назад +1

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

  • @sharpfang
    @sharpfang 6 месяцев назад +1

    C++ has its advantages. Use a bignum library with C, a = (a+1)%max; becomes bignum_add(tmp,a,1); bignum_divmod(tmp2, tmp1, max); bignum_copy(a, tmp2.modulo); I can write constructors for my structs. I can namespace my globals. I can use json without wanting to kill myself.

  • @emstallz1781
    @emstallz1781 8 месяцев назад +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 8 месяцев назад +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 8 месяцев назад +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 8 месяцев назад

      @@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 8 месяцев назад +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 8 месяцев назад +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 :)

  • @AxelStrem
    @AxelStrem 8 месяцев назад +66

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

    • @bies_moron4404
      @bies_moron4404 7 месяцев назад

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

    • @AxelStrem
      @AxelStrem 5 месяцев назад +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 2 месяца назад

      @@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 Месяц назад +1

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

  • @sherwinbangs
    @sherwinbangs 2 месяца назад +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

  • @renato360a
    @renato360a 7 месяцев назад +23

    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.

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

      Yeah as a C++ dev I also didn't understand his point about operators overloading lol
      C++ to me is freedom, I can code really low level or really high level by building from the ground up and having a lot of features safety like smart pointers etc...
      When C is just stuck as a low level language, make it pretty much useless in most modern use cases tbh (I would rather use Python) bcs if I do some UI frontend for example I will use C++ and if I need stuff like memcpy, memset, reinterpret_cast, sizeof and a lot of diverse low level stuff I will still use C++ because I can do both:
      Low and High level at the same time, having the best of both world !

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

      yeah. i think its really neat how in c++ i can make a vec struct template that overloads a bunch of math operators, so i can do math on them how i would with base number types. the alternative (explicitly calling functions for everything) would be much more verbose.

  • @fr89k
    @fr89k 7 месяцев назад +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 4 месяца назад +6

      Can you say that in clash royale terms 😖

    • @mycelia_ow
      @mycelia_ow 4 месяца назад

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

    • @fr89k
      @fr89k 4 месяца назад +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 4 месяца назад

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

    • @fr89k
      @fr89k 4 месяца назад

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

  • @thejackimonster9689
    @thejackimonster9689 2 месяца назад +1

    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.

  • @r0yce
    @r0yce 8 дней назад +1

    The problem with people who defend C++ often doesn't use C++ at all. They just write procedural C++ like it's C with classes and vectors. If they actually start using advanced C++ features theyd understand how error prone that code is. Now it is definitely a skill issue for me but I'd rather write simple code than debug hours of complicated code

  • @duckenjoyer13
    @duckenjoyer13 7 месяцев назад +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...

  • @mobslicer1529
    @mobslicer1529 8 месяцев назад +3

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

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

    Agreed! I had to translate lines of C code into MIPS ASM in my hardware architecture class. C maps more directly to the low-level instructions. C++ tends to abstract away too much and the syntax can be weird. Personally I prefer coding in Java though.

  • @hallrules
    @hallrules 8 месяцев назад +2

    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.

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

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

    • @amuldoodh556
      @amuldoodh556 14 дней назад

      @@suoyidl2654 the linux kernel ain't enough?

    • @desplmfao
      @desplmfao 11 дней назад +1

      linux kernel source code

    • @suoyidl2654
      @suoyidl2654 11 дней назад

      @@desplmfao daym, you worked on the linux kernel?

    • @haricharan9852
      @haricharan9852 10 дней назад

      Can projects made using C along with the Raylib library be considered a C-based project?

  • @DaFrancc
    @DaFrancc 5 месяцев назад +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 3 месяца назад

      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.

  • @jefferymuter4659
    @jefferymuter4659 8 месяцев назад +1

    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.

  • @segueoyuri
    @segueoyuri 2 месяца назад +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

  • @FyberOptyk
    @FyberOptyk 7 месяцев назад +9

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

    • @Phantom-lr6cs
      @Phantom-lr6cs 3 месяца назад

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

    • @PiotrPilinko
      @PiotrPilinko 3 месяца назад

      @@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 8 месяцев назад +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 8 месяцев назад

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

    • @MrDaAsif
      @MrDaAsif 8 месяцев назад +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 7 месяцев назад +2

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

    • @RetroAndChill
      @RetroAndChill 7 месяцев назад

      @@ic6406 Move semantics is a good reason to

    • @PiotrPilinko
      @PiotrPilinko 3 месяца назад +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.

  • @xt3rm1nat0r8
    @xt3rm1nat0r8 3 месяца назад +1

    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.

  • @jamesjamey8596
    @jamesjamey8596 2 месяца назад +1

    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.

  • @____uncompetative
    @____uncompetative 7 месяцев назад +5

    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.

  • @MrSlowestD16
    @MrSlowestD16 7 месяцев назад +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 7 месяцев назад +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 6 месяцев назад +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 6 месяцев назад

      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 6 месяцев назад +3

      @@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 6 месяцев назад

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

  • @roberteltze4850
    @roberteltze4850 7 месяцев назад +1

    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.

  • @philoldout7489
    @philoldout7489 3 месяца назад +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 3 месяца назад

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

  • @seanhollibaugh3776
    @seanhollibaugh3776 7 месяцев назад +10

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

    • @martinprochazka3714
      @martinprochazka3714 7 месяцев назад

      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 Месяц назад +1

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

  • @TheRealJman87
    @TheRealJman87 8 месяцев назад +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 8 месяцев назад

      Modern C++ makes me want to vomit.

    • @sinom
      @sinom 8 месяцев назад +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 7 месяцев назад

      Modern C++ is pure crap.

    • @fr89k
      @fr89k 7 месяцев назад

      @@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 3 месяца назад

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

  • @izimsi
    @izimsi 2 месяца назад +1

    also in C there is usually one or two ways or doing something, in C++ there's a hundred and the hardcore OOP fans will only accept one.
    I was just dumped into a C++ project with only C experience and I'm literally writing the same amount of logic 10x slower and its still not enough

  • @Dhekranh
    @Dhekranh 2 месяца назад +1

    Dude, I learned C before even college, when it was still considered a “high level language”and is my favourite. I never managed to learn C++. College was the last time I was able to use it. Since the first job I got, it was Java, PHP, JSP, C#, Javascript. I got fired last year but can’t get a job anymore ‘cuz I wasn’t using Python, Node, Spring boot, Angular, or React at my last job. Now there’s so much abstraction it seems they just want people to feed programs to a damn language model rather than actually develop software. I’d rather deal with C++ abstraction at this point.

  • @anassqadil1376
    @anassqadil1376 8 месяцев назад +16

    skill issue :/

  • @matthewrichardson4435
    @matthewrichardson4435 8 месяцев назад +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 7 месяцев назад +1

      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 3 месяца назад

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

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

    Operator overloading was a mistake.

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

    100%. I won't write c++ unless I absolutely have to and even then I use the bare minimum of features.

  • @nroos2043
    @nroos2043 8 месяцев назад +14

    i thought he was talking ab bra size

    • @JS-mg8no
      @JS-mg8no 8 месяцев назад +7

      This man knows nothing of the sorts

    • @gabrielbarrantes6946
      @gabrielbarrantes6946 8 месяцев назад +2

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

  • @wattihrvolt-pn3pf
    @wattihrvolt-pn3pf 8 месяцев назад +7

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

  • @confuse3671
    @confuse3671 28 дней назад

    One aspect of low level programming this is sometimes tough to understand is "What can be optimized easily?" "what am I doing that is thwarting compiler optimization?" So many times I see programmers doing stuff that the compiler will just trip over.

  • @noxdraconis3310
    @noxdraconis3310 20 дней назад +1

    Learning python first, then c++, I realized I prefer c++ over python for similar reasons.

  • @williamandre2984
    @williamandre2984 7 месяцев назад +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 7 месяцев назад +3

      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 7 месяцев назад +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 7 месяцев назад +1

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

    • @marcs9451
      @marcs9451 7 месяцев назад +2

      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 7 месяцев назад

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

  • @homematvej
    @homematvej 8 месяцев назад +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_ 8 месяцев назад +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 8 месяцев назад

      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 8 месяцев назад

      @@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 7 месяцев назад +3

      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 3 месяца назад

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

  • @honkhonkler7732
    @honkhonkler7732 4 месяца назад +1

    I see the value in object oriented programming but my brain just has a much easier time wrapping itself around procedural code.

  • @BigJMC
    @BigJMC 8 месяцев назад +1

    Yeah I learnt C a lot faster than C++. C++ just felt like bloated and half the time I didn’t know what was happen in the code, it was just painful to read for me. Like in C I know what I’m coding and what it’s doing but in C++ I’m just absolutely confused on what is going on half the time.

  • @afj810
    @afj810 4 месяца назад +4

    At that point just use assembly then

  • @carl_84
    @carl_84 8 месяцев назад +19

    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__ 8 месяцев назад +5

      std::string

    • @mage3690
      @mage3690 8 месяцев назад +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 8 месяцев назад

      ​@@__Brandon__std::string_view

    • @captainfordo1
      @captainfordo1 8 месяцев назад

      struct String
      {
      char *str;
      u64 len;
      }

    • @zhulikkulik
      @zhulikkulik 8 месяцев назад +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.

  • @AkiiiMatcha
    @AkiiiMatcha 8 месяцев назад +1

    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.

  • @SloppyPuppy
    @SloppyPuppy 4 месяца назад +1

    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.

  • @emmafountain2059
    @emmafountain2059 8 месяцев назад +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 7 месяцев назад +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 7 месяцев назад +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 7 месяцев назад

      Python is one of the shittiest languages out there

    • @PiotrPilinko
      @PiotrPilinko 3 месяца назад

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

  • @WillD-jj9kg
    @WillD-jj9kg 7 месяцев назад +5

    I just write straight to the transformer with a pin

    • @Isawadigitalferrari
      @Isawadigitalferrari 6 месяцев назад

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

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

    You can do the same with C++, it is open source and so are most of the libraries...
    Your resoning is kinda deductive, where does it end? Assembly? Microcode? Designing the circuits yourself?

  • @kbtankou3155
    @kbtankou3155 6 месяцев назад +1

    C++ add good features but its a hell to understand every project

  • @elementkingaming1947
    @elementkingaming1947 7 месяцев назад +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 6 месяцев назад +3

      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 3 месяца назад

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

  • @koiledPythonRain
    @koiledPythonRain 7 месяцев назад +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

  • @braedonwatkins967
    @braedonwatkins967 3 месяца назад +1

    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.

  • @saaah707
    @saaah707 3 месяца назад +1

    ::personally::I ::love().all

  • @robertoprestigiacomo253
    @robertoprestigiacomo253 7 месяцев назад +7

    Solution: read a C++ book.

  • @po1sonseede9001
    @po1sonseede9001 7 месяцев назад +6

    No offense but this is probably your worst take.

    • @ker0356
      @ker0356 2 месяца назад

      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

  • @Bsjlvxswk
    @Bsjlvxswk 13 дней назад

    I use C for embedded code and C++ for software simulations/projects. When memory is effectively limitless, it’s nice being able to do whatever I want, however I want in C++. Dynamic memory in C is unpleasant without raii or smart pointers. But I would never use many of C++ features in embedded projects.
    With vscode/intellisense, it’s easy to see what operators do what so that helps too.

  • @henrykkaufman1488
    @henrykkaufman1488 8 месяцев назад +4

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

    • @martinprochazka3714
      @martinprochazka3714 7 месяцев назад +1

      What does that even mean? 😅

    • @henrykkaufman1488
      @henrykkaufman1488 7 месяцев назад

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

    • @PiotrPilinko
      @PiotrPilinko 3 месяца назад

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

  • @svarodzic
    @svarodzic 8 месяцев назад +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 8 месяцев назад +2

      He knows cpp

    • @homelessrobot
      @homelessrobot 8 месяцев назад +2

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

  • @oglothenerd
    @oglothenerd 8 дней назад +1

    It is sort of like how I know how to make a CPU emulator and I know how instructions work in binary, so to see an opcode in binary is easier to remember than in human readable decimal number system. It is because I know what the opcode means.

  • @asmithgames5926
    @asmithgames5926 4 месяца назад +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 3 месяца назад +2

      This requires decent programmers though :D

    • @asmithgames5926
      @asmithgames5926 3 месяца назад

      @@PiotrPilinko Decent programming normally does.

  • @haubro18
    @haubro18 8 месяцев назад +4

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

    • @homelessrobot
      @homelessrobot 8 месяцев назад +3

      yes, but it is a pretty important one.

  • @TheIncognitusMe
    @TheIncognitusMe 7 месяцев назад +4

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

    • @PiotrPilinko
      @PiotrPilinko 3 месяца назад

      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

  • @StefaNoneD
    @StefaNoneD 28 дней назад

    It depends what you want to make. If you have a big project and you want to use C++ more like a high level language as alternative to C# and Java, then C++ is the better option in contrast to C

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

    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;

  • @JakeFace0
    @JakeFace0 8 месяцев назад +3

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

    • @salarsan12
      @salarsan12 8 месяцев назад +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 7 месяцев назад +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 7 месяцев назад

      ​@@egg-mv7efnope egghead

  • @Izuhu
    @Izuhu 7 месяцев назад +4

    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 7 месяцев назад

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