Linux serverlinux web serverNETWORK ADMINISTRATIONS

the TRUTH about C++ (is it worth your time?)

C++ gets a lot of hate on the internet, and there may be good reason for that. I think C++ is misunderstood, and there are a few simple reasons why. Despite being designed around 3 simple principles, the language has inflated to have a ton of features that are either too complicated to understand, or too powerful to implement without making your code base unmanageable.

But, should you learn C++? Yes. There are a few caveats though.

🏫 COURSES 🏫 Check out my new courses at https://lowlevel.academy

🙌 SUPPORT THE CHANNEL 🙌 Become a Low Level Associate and support the channel at https://youtube.com/c/LowLevelLearning/join

Why Are Switch Statements so HECKIN fast? https://youtu.be/fjUG_y5ZaL4
Why Do Header Files Exist? https://youtu.be/tOQZlD-0Scc
How Does Return Work? https://youtu.be/e46wHUjNDjE

🛒 GREAT BOOKS FOR THE LOWEST LEVEL🛒
C Programming Language, 2nd Edition: https://amzn.to/3OKh3q2
C++ Crash Course: A Fast-Paced Introduction: https://amzn.to/3qdZILK
The Rust Programming Language, 2nd Edition: https://amzn.to/3MHaS36

🔥🔥🔥 SOCIALS 🔥🔥🔥
Low Level Merch!: https://www.linktr.ee/lowlevellearning
Follow me on Twitter: https://twitter.com/LowLevelTweets
Follow me on Twitch: https://twitch.tv/lowlevellearning
Join me on Discord!: https://discord.gg/gZhRXDdBYY

source

by Low Level Learning

linux http server

43 thoughts on “the TRUTH about C++ (is it worth your time?)

  • Another criticism that you can say about c++ is that it has too much technical depth. Because the syntax want to be compatible it keeps all the older stuff. So C++V11 and up will tell you not to use pointers but it won't stop you from using them either.
    I have written production code in C++ but I was interested in learning C++V11 but got turned off by all the new syntax.
    Instead, I fell in love with rust because that is basically C++ if they could do it all over again.

    There are some comments that may say that you have to write what your software company writes. But something like rust can be compiled to libraries that can then be used by C++, this would not only get you to a better workflow, it may set you up to lead the engineering team in the future.

  • C++ is c cocain on steroids use c++ to much it can lead to heart failure , cardiac arrest , dementia and python speed syndrome

  • C and C++ both completely deferent C has general programming concept where C++ goes with Object and class like Object Oriented Programming Concepts, yes both are Classic programming languages compared to any other programming languages.

  • The malloc and calloc stuff is more for beginners who don't know that a class is not just a structure but has other stuff that is init'd with the constructor, which is automatically done with new while the C ones does not. Many C programmers come in C++ creating an object with malloc, manually init the members and it crashes, without the fact that members are initialized twice for some. Due to not knowing how it works under the hood. malloc and calloc is not very used due to this.

  • C++? Your God has Reverse Engineered Windows Media VP9 Codec. He's Reverse Engineered Windows XP.
    He Cant Make Fast CPU's Cheaply.

  • The STL (Standard Template Library) is a jewel. Do other languages have the equivalent?

  • I graduated on telecommunications, so I've seen c and c++ while studying. Then, in my first job (2015), I started working with JS (for a small part of my tasks), until I decided to learn it all the way (2019). Did a lot of courses on webdev and JS and switched jobs to full time web developer (mostly backend, though). Then I started learning Rust, and that made me see how much of a toy language JS can be (although I do still love it). And now I'm learning c++ (I forgot practically everything from university) to help a friend in a project of his.
    And, to be honest, I am considering learning also c right after finishing with the exercises in exercism and probably checking out your c course.

  • The Truth. Your God, Doesn't Tell You the Truth. The Truth is, Your God doesn't Have Pure Metals. So its Harder for Him to Make a 386 (C++) as Compared to a 286 (C).
    You can Do Object Oriented Programming with C. The Windows Api (Win 32) is an Example of This, You Don't Need C++ (386).
    Its Just That C++, The Compiler Enforces you do to do things in Certain ways. This Stops Programmer Mistakes. A C Programmer is More Likely to make a Mistake doing Object Oriented Programming in Comparison to C Programmer.
    The Truth. Your God, Doesn't Tell You the Truth. Its for the Same Reason Your God was Late to the Java / C# .Net Bandwagon.
    The Borgs Sun Microsystems (HP) copied Visual Basic 6. Then Borg Intel (Another division of HP) bought it off them to Make C# .Net.
    Your God was Very Late to the Party. ASP .NET Core and Project Mono (Xarmarin) and Open Java.

  • yes, it's worth it. It's the most powerful language. It allows for high level abstractions while maintaining incredibly high performance. I agree on that you should first learn C and then move to C++.

  • C++ is a mess and it’s an overloaded language. At least half of what it adds to C is useless. Just learn how to program. Be good.

  • (I know this video was a year ago but going to comment anyways for newer programmers that may come across it) The first language I learned (20+ years ago) was C. I focused on it for 4-5 years (and dabbled in various other languages in that time (ASM, perl, VB, Prolog, etc (don't you just hate nested parenthesis ;] ))) Eventually I started learning C++ and much preferred it and not because it was better but it just added features that I really liked that saved me time. Linus ( P.S. I have nothing but respect and admiration for him…. Linux is amazing and all of us Linux users have him to thank for it) can complain about C++ all he wants about C++ allowing you to "blow your leg off" but at the end of the day C will happily allow you to do the same thing… both languages are good and both are powerful… That's the life of low level languages. It's up to YOU, the programmer, to play with various languages and find the ones that fit the way that you think…. just my thoughts… opinions may vary… I'll see myself out….. ;]

    TLDR: try out different languages and find the ones that are right for YOU!

  • Rust should replace C++ as Rust is obviously superior. The real power of C++ is the power of C. C++ is "C with crap".

  • Wait… That complicated for loop is far better and more future proof than the simpler one.

    In fact many of these "issues" aren't big deals at all…
    I'm sorry, I'm confused.. is this a parody or something?

  • The people who complain about C or C++ either don't know the language and want something point the finger at, or they don't know how to express what they're trying to implement what they want, its as simple as that.

  • Don’t learn C at all. Learn modern C++, and use it according to the latest guidelines: don’t use raw pointers, initialise everything, etc.

  • There is a tool for every job. If your task is to be close to the hardware and/or you frequently are looking at the assembly code for performance reasons, it is probably more convenient to work with C. But if you are dedicated to solving higher level problems, abstraction of objects from C++, will be very useful for you.

  • Personally, I find examples like at 2:03 very silly. All of the difficulty comes from shitty formatting and naming. You can achieve the exact same thing in C.
    This is the exact same code, just cleaned up. Most people from any language will be able to read this and spot the problem.

    template<typename T>

    struct Example

    {

    public T m_memberVar;

    // Constructor.

    Example(T param) : m_memberVar(param)

    {

    }

    };

    template<typename T>

    int FunctionExample(T variable)

    {

    FunctionExample(ClassExample<T>(variable));

    }

  • Should I use C++ to apply to a company as my first job? I love OOP, and later, when I'm used to OOP, I wanna learn OOP in C. I've been reading that the Linux kernel uses OOP in C, so I would love to join. That's a tasty thing to accomplish to me.

  • Bruh, when I graduated bachelors, no one wanted a C++ programmer, I used to be good at it, then I switched to Swift, because it is exponentially cleaner, and little bit of consideration can allow you to define what the function does in the function declaration itself, also it has powerful and safe tools. Now suddenly there is a huge demand for C++, what is happening my guy.

  • C++ For life I learned python, java and javascript yet none of them felt as powerfull as c++. The power I feel while using it is not expressable

  • C++ is great for me when used in a reasonable way. I often structure most of a program in a procedural way because it flows nicely like that. It is a set of procedures to accomplish a goal. I like C++ when it comes to working with structural things. Sensors, databases of 'things', a representation of an overall interface that can be almost visualized as a thing with buttons and knobs to turn that do certain actions. C is a nightmare for me with that but well designed C++ objects can make it VERY clear how to work with something. It also lets me graft in new stuff that 'just works' in places the old stuff did. I was writing some code for running a little robot and using built-in GPIO later added some I2C to it, then even later needed to work with an I2C GPIO expander. I was able to make it so once that I2C I/O expander was initialized and ready to go it's GPIO pins could be substituted for any of the GPIO onboard and everything worked perfectly. It was just another pin object that you could work with just the same as the others. Sure it can all be done in other ways but for me C++'s 'The way' makes the most logical sense to me and I'm all that matters in what I create.

  • A bit late. but .. 2:12 min in the video you claim C++ is a subset of C.. that is a lie.
    C++ is not a subset of C. people need to stop thinking it is because its not.

  • python sucks though. the only reason why its so popular is that its easy
    c++ is fantastic

  • I have worked with C and C++. C++ has better abstraction mechanisms and is more suited to make large applications. Modern C++ solves many of C problems (i.e. memory leakage; dangling pointers and buffer overruns). It has though dark corners and I am not enthusiastic about the latest language features. Linus is a respectable OS developer but probably he hasn't a clue about C++. Btw it's not zero cost abstraction but zero overhead.

  • I find that c++ is more intuitive than languages like java, c#, etc. But damn c++ error messages are a pain in the ass.

  • people all talk about how much they love C and how much they hate C++… until they have to write performant multithreaded multiprocess code with type generic shared memory dynamically sized objects
    I love C more than anybody else, but most people today who don't appreciate C++ are just a beginners to coding who don't understand the true benefits it brings.
    also people keep quoting Linus saying he dislike C++, but he said those things in 2007. Frankly in 2007 I'd say the same, C++ was kinda terrible back then. C++11 was a big game changer, and the language has done major leaps forward starting from 2020 as well.

    what I've learned over and over again with every programming language I learned: I don't hate the language, but seeing bad code written in that language makes me hate it.
    Sure, badly written C++ is a pain. guess what? badly written C is a pain too. Oh, you think templates are bad? So what's the alternative? macros and void pointers? yeah no thanks

    tldr: don't hate on C++, hate on people who write bad C++. well written C++ is nice, short, easy to understand, and solves complex problems with much simpler solutions than C.

  • Dang bro, I'm still stuck between C++ and Rust. I've been learning javascript and C for pen testing and development. You might consider a more in depth C++ vs Rust and why some might learn one over the other. I don't know where to invest my time.

    I feel like I would have more opportunity with C++ because rust is in early development. But Linus Torvald talking down C++ and it's large library make it seem like I'd be better investing more time with rust.

  • Saying that C++ is bad, is like saying life is bad. You can create everything with c++

  • Yes, it is worth investing time in learning C++. Mastering C++ can help with problem-solving at different stages by providing a strong foundation in programming concepts, improving your technical knowledge, and opening up opportunities in high-demand fields. C++ is known for its speed and is used in critical areas such as operating systems, web browsers, and databases, making it a valuable skill to have. Additionally, learning C++ can make it easier to pick up other languages and expand your programming capabilities.

  • There are several features of C++ that I like, however, it can also be greatly abused. I use C or C++ depending on the application being implemented. I like C++ function overloading when implementing applications that will grow over time. But for embedded systems, C is more straight forward, has a smaller footprint, and is better for programming down the the bare metal. For web apps, accounting apps, etc, C++ is a better fit. Choosing C vs C++ is also depending on if you're writing your own apps completely standalone, or, if you will be interfacing to 3rd party libraries. Sometimes you don't have luxury to choose, depending the environment you're working in. Unless you are the boss, you may be required to work in C, C++, Python, etc, etc. If you're looking for work or a career in some field, the more languages you learn, the more job possibilities there will be.

  • c++ stil better choise for gamedev. I tried zig and rust and this languages just make more issues than solve.

  • mathematicians: isolate your variables if you want to be taken seriously
    bjarne: ok but what if I inherit the abstract virtual public private pointer dereference override injector manager factory?

Comments are closed.