Met him at a Usenet conference in Portland and brought up a language feature issue. Really nice guy, he took a definite interest and we corresponded via email for few months, but C++ standards committee people were hot and heavy on this RTTI feature at the time and had no interest in taking anything else on. Even then the so-called standards body was calling the shots, which means he has less influence over C++ than Linus has had over Linux
"Keep changing practices → Constantly create new bugs and unnecessary complexities → Claim that our language is BAD → Claim that we need a new language → Repeat"
I mean, why? Just why? And guys keep shoving stuff into C++ too, like it had to support EVERYTHING. It's the most multipurpose language in theory, in practice it's used for the same things but people see those "new and exciting features!" and make a mish mash of them just to produce the most unreadable code hahaha
C++ is like a violine... with keys, cords, bag hide, cups handler, mouthpiece, pedals and wheels. Strings are only for backwards compatibility and their use is considered as a bad practice.
@@segueoyuri I'm referring to the difference between these two signatures: void foo( unsigned* C ); void foo( unsigned& C ); Either one of them can fall flat and that's okay, but at least neither of them are too #.
I remember my first lecture on C++ at university: prof started his speech along the lines of "in contrast to C, C++ has classes". I was like: "mf, what is C? Did we miss a semester?"
@@wasab1tch A lot of people that program low level stuff omit almost all C++ features to program as close to C as possible, if not using C straight away. C also forces you to learn all the fundamentals and understand them at a deeper level, because you don't have anywhere close to as many tools to abstract things away, also reducing the risk of you starting to abstract where it's detrimental and thus builds better habits for the future. For education in the long run, better fundamentals are key. And a language like C++ that has the tools for you to just gloss over a lot of stuff is harmful to those learning. And this ignores the whole embedded programming being almost exclusively done in C. And any machine that has some kind of processor in it has the need for embedded programming, so nowadays... a vast majority. So, stating no one should be learning C anymore... just shows how ignorant one is to how crucial that language is to our day to day live.
@@wasab1tchhe said educational and i heavily agree on that. C should be the standard intro for coding and since the language is quite barebones you can be competent in a week or less.
I've been using C++ on a daily basis for the past 20 years in game and game engine programming and I consider myself expert level. There are still areas that I've (almost) never touched and I frequently have to look things up even though I use a lot of sophisticated template constructs. Also at the rate the language is currently adding new features, this won't change any time soon. C++: not easy to learn, probably impossible to master 😅.
I had to implement a tagged pointers library on my software to get rid of virtual polymorphism on the path-tracer ... because vtable pointers cannot be shared between CPU and GPU and I wanted to port it to cuda. I'm still hurting from all the templates and sfinae I used . It was at the same time interesting and traumatizing. Interestingly traumatizing.
I think knowing entirety of C++ is only useful if you are teaching others. Because in reality a lot of it is useless, I ve worked with people who used C++ since 98 and they still dont know all of the language and many dont care about the new standards since they rarely add things that solve their specific problems.
@@filipg4ppl who teach any programming language typically do not understand 10% of it. Rule of the game is to discard any "advice" a programming instructor pushes.
Somewhere on YT is a video from some C++ conference a few years back where we see Bjarne himself failing to predict the result of a few lines of C++ that demonstrated some new C++ feature. I concluded from that that it impossible for any single human to understand C++ and how all its features interact. Even the human that created it and has lead it's development since.
He was asked once how he'd rate his proficiency with c++ and he gives himself a 7. This is not a guy who walked away from the community or retired from its development.
@@dylankun28 I kind of feel sorry for Bjarne, having to spend his life watching the crowd run away with his creation and turn it into a Frankenstein monster. Mind you I had severe reservations about the design decisions made in the original C++, as described in his book on the design of C++ back in the day.
When I first started learning programing, it was basally C++ or Java... and I wanted to make games, so I learned C++... terrible beginner language, just learn GO instead now.
For me, the hardest thing about C++ is that you often have to dig through 30 years of outdated practices before finding the current best approach. The language has changed its fundamental implementation guidelines so frequently that two versions of the same program, written years apart, can look nothing alike.
My problem with C++ is, I want to know some of those outdated practices. Cause Pointers are truly simpler and easier to know once you get past the initial hurdle of dereference Smart Pointers arnt it and the whole thing isnt fun to work with and more clunky and more verbose. Then slamming * at the start of stuff, imo
@@freezingcicada6852 dereferencing smart pointers is syntactically identical to dereferencing raw pointers. There is nothing clunky about it. The only verbose part about them is within declarations. I'm fascinated how much hate C++ is still getting for the pettiest reasons. That was a topic already 20 years ago and despite lots of fundamental improvements since vanilla C++, the "arguments" are still the same as back then
😅I don't know if Primeagen will see this, but a long while ago I randomly joined a Twitch stream where Prime and Teej were talking about concurrency, parallelism, buffer overflows and something about arc mutex. I did not understand a freaking word. I then made my next rookie mistake of the evening, by jumping onto Theo's stream where within 5 minutes I realized that I didn't know $hit about JS / TS either. So I challenged myself to at least understand half of the alien words these guys were saying... by trying to learn C, Rust, and Go at the same time. I still have skill issues when it comes to front end but I now understand what Prime and Teej were saying that day. And I wrote my first web server ever in Rust of all languages. Time will level you up people. Just keep going!!!
Unironically, if your goal is to be introduced to every programming concept that has ever existed, C++ might not be a bad option. But in reality, a lot of these things are only confusing because of how many things you don't know, so you look up mutex and it references 'concurrency', 'synchronization', 'primitive', and 'thread', then you look up 'concurrency' and it references those same terms plus a few others, and so on. But none of these concepts are difficult individually or even collectively, you just can't figure out what any of them mean because they all reference terms you don't know. This is honestly where I think books are way better than internet for learning. A book will have a progression of information, explaining things on top of each other from the ground up. There are internet resources that do the same, but they can be hard to find. Just searching for terms looking for answers to specific questions can be very hard when you don't already know a fair bit about the subject. It's the difference between structured learning and reference material. The internet and searching is great for reference, but reference material is not effective unless you already know a lot.
@@radadadadee Honestly, it really is not. At least not after the C++11 standard came out. It is useable in a wide variety of settings and of programming styles. Once you realize that you should not use all its features and all its allowed styles in the same project, it becomes much, much easier to program with it.
@@radadadadee It's really not. Actually, it's probably one of the single best designed languages out there, which is why it's been around so long and we're still using it and adding to it. But hindsight is 20/20, and the design from the 80s couldn't see into the future. There are plenty of things that could be better, but that doesn't mean it was badly designed. It's just old. Also like the other guy said, C++ is like Linux which is like 1776. They all equal freedom, and they will absolutely allow you to do things that you shouldn't do, because they don't hold your hand and make sure little baby doesn't hurt himself.
@@rameynoodles152 Simply put, well said. 100%. It's kind of like looking at a car from the 1940s and comparing it to a care from the 2020s. The newer cars have a lot more features, many more censors, redundancy checks, etc. Yet under the hood, the mechanics of the engines, transmissions, and drive trains are for most tense and purposes the same concepts. A car from the 40s didn't have anti-locking breaks, they didn't have power seats, windows, mirrors etc. Most of them didn't even have automatic transmissions, most were still manual then. So yeah, it's similar in this regard using it as an analogy of comparisons. If C is a car from the 30s and 40s, then C++ is a car from the 50s and 60s, and so on.
Don't think about how long it takes to learn anything; it leads to overanalysis paralysis. Just start learning; that is the only way to learn. Pick some syntax and start building something.
Not even just analysis paralysis, but it ignores the fact that understanding all of the wrong ways to do something is the only way to truly understand why something is the right way. If I give you a bunch of code of best programming practices in a new language, you’re not likely to take away what actually makes it correct unless you can contrast it with what bad code looks like. Almost everything is valuable to read and learn from.
yep. in my journey i can fluently right crystal lang right now just like how i can write English. once you start understanding the programming language, it'll open up so many doors you never thought possible when you're just starting to learn. time is gold, we can't waste it. learn a language and run with it
but cpp might truly not be the best language for that considering how much stuff is t here and you have no idea what's good, what's bad, how to approach it
@@hetgurjar5836 A language made by Ginger Bill. It's got a lot of useful stuff for game dev built-in. Compiles to C, making it able to be linked to other projects. Rather straight forward build process and import system. Several game framewoks already supported and included in the vendor library thanks to community effort.
If you need 40 hours to understand a piece of code, i think the code was bad. I like to quote Terry Davis in that regard "An idiot admires complexity, a genius admires simplicity" Its possilbe that the code was good, but good code, is code you can understand and maintain easily.
Not always for C++. One reason you might pick C/C++ as your language is to write fast or efficient code. Sometimes this ends up being complicated code because the specific efficiency required needs to be written in a specific way.
Knowing yourself and how you learn most optimally is always the first step. That first step might take some longer than others to take, but it is the first step in the right direction for all.
Even with that short video, I think Stroustrup fails to mention that C++ is a "multi-level" language, a concept (no pun intended) he often explores in talks/confs. It is much easier to learn how to use heavily templatized libraries designed by other people than learning how to write/maintain that kind of hocus-pocus meta-code. This aspect of the language is only becoming more salient over time. Between college and my early career, at some point I considered myself a rockstar, guru-class C++ programmer including the STL and the iostreams (popular at the time). Then work switched to enterprise Java and I barely used C++ for some 15 years... then new job/team/projects, here I am back to C++ and I was shocked with how the impenetrable the code was when peering into some advanced libraries written by experts with the latest features, even though I could still write very good "normal" code easily.
The point about reading someone else's code is on point. The interaction with macros, templates, vectors, inheritance, and overloading makes it so that people can accomplish a lot and in a lot of ways. However that makes it so that someone can use all of those features and make some code that looks almost like it is a different language. Then each code base you come across can have that same week-long learning period where you have to figure out how they use all those features.
2:40 That's exactly it! I started to code with C/C++ at uni with a good understanding of the fundamentals and andanced techniques. Around the middle of my studies, I started with web development and got hooked. I've now been working as a frontend developer in my first proper job for 2.5 years. Recently, just for fun, I explored Unreal with a friend because I thought, "Hey, I used to know some C++." I tried to contribute to a small project but barely understood what was going on. Real life coding is much more difficult and C++ is not easy to transition to.
Always loved how Bjarne looks like a cross between Jack Nicholson and Dr. Brown from Back to the Future. One of the few greats who personally replied to an email of mine once. Cool guy.
If you consider an extended weekend , meaning 4 hours on Friday, 8 hours on Saturday and 8 hours on Sunday, you get 20 hours, with 6 pages per hour, you get 120 pages. The "A Tour on C++" is more than 200 pages. So I agree with you.
Just wanna say, for all the junior devs out there just getting started, or for the people who haven’t even started yet. While Prime, and channels like his are huge in the code community, these guys are very talented, a decade+ into their careers, and have dedicated thousands of hours to practicing and honing their craft. These are the standards we should strive for, and strive to surpass. But it is unrealistic to think you can be where they are in just a few months, a couple years, etc. Don’t be discouraged because you don’t code like these guys. Shit is hard, it’s gonna take time. But you’ll get there eventually.
5:08 - 5:26 that's when Delphi comes in. It's not the most elegant language and offers almost only one way to do something, but the learning curve is easy. Man, after just one week of learning, you can dive into your project.
True, the aspect that you need to know _how_ languages are applied best is highly underestimated. This is even the essential part of learning programming. Understanding the syntax and trying out a few examples programs from the book is simple. But when it gets complex, or when you need to maintain or use code from others, the real challenge begins.
I hate how C++ people sprinkle #ifdef in the middle of a class. Just make two different classes for Windows and Unix. Boohoo you have to type a few extra lines of code
@@spicynoodle7419 don’t you still have to sprinkle those ifdefs else where then to make sure you are using the right platform specific classes for certain builds? Of course it depends on the situation but if you need them anyway I don’t really see the big deal personally
@@spicynoodle7419 if they didn't, they'd need to sprinkle it throughout the rest of the code instead rather than just in one place. Though, usually you'd instead have a separate class for both and then #ifdef which of the two gets used. But ifdefs in the middle of the class are the most efficient way for debug-differences. You can add extra data and functionality for debugging, and then just keep it there in case you ever need it again, and when you build for release, or testing with optimizations, the compiler just builds without any extra overhead that not #ifdefing it would entail.
Haskell is not that difficult to learn. Its syntax has basically never changed (similar to C), and functional programming is inherently no more difficult than procedural programming. Being a strong type means that it does not have strange implicit conversions like JS, nor does it have hidden event loops or implicit coroutines. You just have to get used to the way it expresses questions.
Not joking or baiting but is there anything now made with haskell Business wise? I only hear about it with content creators. And ive never see any job asking for it
@@joaovmlsilva3509 In life, more rare some things are, more valuable they are, just find the one that needs it. Prolly in programming is the same, more programmers in a language, less value.
I actually learned to program by reading the C++ manual when i was 15, and then I just read the 5.1 lua manual, but still... it began with Bjarne Stroustrup
Well to understand somebody else's code you not only need to know the language that person chose, you also need to understand what the problem was and how it was approached. The whole "clean code/readable code" vs write a freaking documentation or design report like any other engineering field. And it also really depends on what you want to do. C++ offers a lot, but most of the time all you need is a damn cake, no cherry no glossing, no stylistic sugar, just some eggs, flour, and sugar and that's it.
There's so many ways to eat a soup. Just choose what counts at the moment - speed, elegance, end result? The same with learning and using the language.
C++ to me in a nutshell is this experience I had: I was leaning about sorting algorithms and we had to find another alg that was not presented in class and to write it in C along with a few others we had seen in class. So I found a implementation of a patience sort in C++. "Well, I've been using C for years now, I bet I can just transcribe the idea and use it. I know how objects work and that's probably fine". I couldn't. I just couldn't. Nothing in the code made the slightest sense to me, only the constructors and destructors. I couldn't understand what the code was doing. Like at all. That day I learned that 1 - C++ is not C with objects, it's a whole different animal; 2 - even badly written C code (as most is) is readable. That well written C++ was not. So I do not know C++.
The thing that makes C++ hard for beginners is not the language constructs or the pointers, it's in the tools and the stuff in error console. There are languages where you make an error and the IDE tells you what and where it is. There are languages where you make an error and the IDE gives you 7 lines of brackets of templates and typedefs.
I have started a couple of days ago using (learning) C++ 20 (pre-knowledge of Python, C, shell, awk ...), and I am really loving it. C++20 is awesome, and easy to do productive programming in a short period of time!
I had learned C in college, graduated in 1991, and after working through a short book on C++, I learned the basics of C++ in about 2 weeks. I learned to read C++ code when working at Gimpel Software extracting code segments that caused PC-Lint to have problems (like segmentation faults) with the STL in 1995. One of the more interesting concepts I remember finding in the STL was an operator= function in a friend class that returned the class (and not the friend class). I was weird, though at that time necessary. C++ is a bit weird, though it can make certain projects a bit easier to deal with.
C++ has been my primary language for the past 15 years and however much I love it, I do acknowledge that looking at someone else's code can sometimes be quite challenging. Even extremely challenging if they use a lot of template metaprogramming and/or peculiar macros.
I think knowing a language vs being a master with it are two totally different things. If knowing a language were enough, anybody of us could write best selling books instead of writing software if we wanted.
I've learned about a dozen languages in my lifetime. It takes me a couple of years before I really feel comfortable in a language. Like each language has its quirks and idioms, which may differ from other languages. I've been programming Go for about a year now, and I still don't quite feel like I have mastered it yet, there are still things I'm learning.
If you are coming from a language such as Java or Python, be ready to be tripped up by object lifetime issues, dangling pointers/references, unintended copying (e.g., passing a parameter by value when similar syntax in Java or Python would be by reference), undefined behavior, incomprehensible compiler diagnostics, etc. It's not just about the amount of time to get a working program; it's about the shift in your mental model of the way things work.
The funny thing is, C has these issues too. The difference is, they are harder to encounter (if you know what you are doing) and easier to prevent/account for.
"If you are coming from a language such as Java or Python" do not come to C++. If you are coming from C++, do not come (back ?) to C. If you are in C, stay in this warm place.
2:50, As someone working professionally with C++ for a decade now, even now legacy code is sometimes difficult to follow. But I imagine that goes for most languages. I've also seen some pretty gnarly python scripts used for tooling. You can also really tell that as time goes on people get better at making stuff more flexible/maintainable etc. The newer the code the better it is written usually. Although I do work mostly on safety (class C devices), so rules are quite strict, also when it comes to styling etc.
C++ is easy to pick up and to dive into, but it takes a lifetime to fully master, and even then, when you think you know it fully, it'll still allow you to not just shoot yourself in the foot, but to blow off your entire head. This is one of the few reasons why I like the language. It does as much as possible to not get in your way. It doesn't force you into a specific narrow way of doing things. It's a very powerful, flexible, versatile, universal language. It's a strongly typed scoped based multiparadigm language designed to be efficient, performant as possible. You want to write procedural type code, you can, you want to write functional type you can, you want to write OOP you can, you want to do generics you can, you want to do template meta programming you can. You want to use a bunch of macros and gotos although ill-advised, you can. One of the language's strengths is that you only pay the cost of what you use. If you don't use a feature of the language, there's 0 overhead. And if the code is well structured and well written, then the things that you do use, ought to be super-fast and efficient with minimalistic cost or expense to perform that task or operation. This is from my own personal experience. It's not the best language because there is no such thing. There are many other great languages out there, and they're all viable tools each with their pros and cons. One of the cons with C++ is that the syntax can be atrocious when one dives into using its templating system. It has improved overtime though. I've watched the language change and improved from C++ 98 to C++11, 14, 17, and now into 20, 23 versions. One of the biggest strengths about the language outside of its features is the plethora of available written APIs and Libraries that already exist not including the newer ones being written each and every day by millions of people worldwide. If you don't feel like writing your own functionality, with enough research and digging, you could combine a bunch of different libraries and make a program with minimalistic code you wrote yourself. The only thing with this is you have to consider and know the licenses of the said libraries you choose to use, or you can include no libraries but your own and build everything from scratch. I had a lot of fun learning C++ when I started to learn DirectX, OpenGL and then later on or more recently Vulkan. You can pick up the language over a couple of weeks sure, but it takes a lifetime to master it and even then, you're still learning something new.
I find that argument about many ways to solve the same problem making life difficult and then sighting C++ and Rust bugs. Even in the most simple assembly language for the most simple processor there will be many ways to solve the same problem. It's a non-argument.
It's not really about the "way" to solve a problem and more a rant about the "way" to express it. In C++ and Rust there is 100's of "way" to express something, none of them fundamentally affect the "way" to solve the problem just the syntax and pattern vary which is problematic. On top of that C++ has something that Rust doesn't have that much, is that every of this "ways" of expressing something, comes with a package of subtle differences and edge cases that when combined together lead to widely different experience depending on what features and syntax you used to express something. But If you write C style C++ you get all the benefits of the language with none of it's shortcoming. Like C++ with struct only is fairly easy to understand and debug, compared to C++ with Classes which is ok if you don't use inheritance, but C++ with the whole full pack of 30 different constructor/destructors, templetized and what not with move/forward semantic aware patterns, virtual and inheritance etc is like so complex for no benefits at all unless you are paid by the hour.
@@TheMachina42 OK. I see what you are getting at. However I don't particularly see that Rust is overloaded with different ways to express the same thing. Certainly not as badly as C++ and on a par with many other languages I have used. I do agree that C++ is so massively overloaded with complexity and consequent "surprises" that it is better to write "C style C++". A couple of observations though: 1) I have found it very hard to enforce this "C style C++" among the members of teams I have managed on largish projects. Somehow all kinds of C++ complexity was snuck in there. 2) Whilst writing "C style C++" keeps makes things more manageable and takes advantage of some nice C++ features it does nothing to help with all the shortcomings of C. Exactly the things I would have expected C++ to have tackled when it was invented. To late now though.
@@LogenVonSchlenz I know but just using structs mentally force you to not use C++ features. Which makes programming and especially debugging a lot more enjoyable.
i like how that old guy can actually answer a question. Best case scenario - a few days, worst case scenario, a few years. Why can't people actually bound their answers with orders of magnitude like that these days? Is it cause managers need it exact cause they're unable to handle uncertainty?
Prime's example of the logging library seems more a reflection of the library then the language. You may understand English but not be able to read and understand some dense novel.
Best thing about this video is Primeagen saying he spent 40 hours looking at code and couldn't figure it out. Makes me feel like maybe I'm not a moron because I can't make perfect sense of everything I read on Github.
I once sat down and estimated how much time went into the college courses I did on programming and I figure that if you want to achieve basic proficiency (not expertise or mastery, basic proficiency) with a new language that is a similar style to one you already know, it probably takes about 100 hours (two and a half weeks if you make it a full-time job). If you need to also learn a new programming paradigm (procedural, functional, object-oriented, event-based, etc.) along with your new language, increase it to about 300 hours.
I have fond memories of C++, it was the first proper language I learned that could be compiled into an exe. I was about 14 at the time. As prime says, I could write lines of code but i did not understand it. Actually the thing I miss the most is using -> in it. I felt like such a GROWN UP, compared to the other code I had written. I started off with basic on the speccy and enjoyed it but couldn't write my own, just typing listings in. And at some point there was some pascal, and delphi, and borland, all using stuff that I got off cds that were distributed before the bay. But it got real when I found GCC and could make executables and also write mode 13h graphics code, some stuff raw code, some stuff with Allegro.
I too appreciate Go in the same way. even as an amateur, I can look at a proffessionals Go code and although it is more advanced than mine, I understand what is going on
my very first start in programming was in my physics studying... never programmed befor and had to start with c++ and finish a project in 3 months.... that was HARD man but also a lot of fun! Just wasn't able to do anything else in this time :D
I think you have to see it from hiring perspective. When a company looking for C++ or whatever language programmer they already imply of you knowing libraries that popular and used as well. For example if we take JS, I don't really see much of jobs for just pure JS, it mostly some of the React, Vue, Angular or less popular analogs, but I don't really see anyone looking for just JS developer.
There is a certain police detective academy in Poland where they have programming classes and the language of choice is C++. I kid you not. I know because I had to help one of the students with homework. He was completely lost, not even really knowing what programming is beforehand. Make of that what you will.
@MechPirate That's the thing, I'd say it's simply a graduate school for people who want to join the police as something other than beat cops. (There's probably a name for that.) I guess somebody decided that they should provide some level of IT literacy and that's what they came up with. I may have missed a thing or two, I was focused mainly on helping the student understand what was going on.
While Python is one of the better learning languages it still has a lot of junk to produce to get to the underlaying structures that enables programming.
I learned C and found it relatively easy. When I decided to move on to C++, I was scared by the complexity and ended up giving up. I decided to jump to C# and I've never been happier.
However long it once took, it's now much less time with the ability to throw any question at AI and get an explanation of how to do this or that back in seconds. Has sped up my learning of stuff enormously.
Hard is realtitive! I am picking up C++ took 2 weeks for the Fundamentals. I am retired a Powerbuilder 4GL object oriented language 8 years and Java Programmer 12 years Still learning it, Not forgetting sub languages like SQL, XML that goes with it. There are endless techniques libraries and plenty of frameworks one must know. The Aouther speaks to the inteligent with his anelorgies.
absolutely!!! Before C++ , Java, Python, ladder logic, pascal, Basic,.... etc all we had was Fortran in college, Oh and also NC machine programming. However I could easily understand all the other " violin string instruments with the brass instrument" languages because I also had Differential Calculus, Physics , chemistry, Vector calculus , Dot and cross product, Laplace, Fourier, Eular, Taylor series Complex equations with imaginary numbers transfer functions and on and on and on Soooo I too can turn a very simple script and make it very very complicated just to get a specific result "solve for x" Sad but true🎸🎺🎻🎷
It is an amazing language once you grasp its main structures. The problem is students are not being taught programming they are being given very basic language structures and then jumping into software engineering. They simply do not have a good foundation.
The “learn in a weekend” thing isn’t wrong. I’m used to uh, easier to read languages like C#, Python, (now Dart) and I was able to learn C++ in a few days. If you asked me to, I could probably build some ok console applications (with enough time and google ofc), but I could not read actual, production-ready or production code
As much as I dislike C++, Bjarne Stroustrup seems like a nice guy and his takes are usually very reasonable. Maybe the language would be less of an abomination if he was willing to act as a BDFL, and rein in the _design-by-committee_ approach. But I recognize that the current way of doing things also has some advantages.
from what i recall of my C++ days the hardest part of the language was implementing classes correctly to handle interitance, RAII and exception handling together, for all modes of possible failures. these features in isolation are easy to implement correctly for but in combination their are a surprising number of edge cases and potential resource leaks to consider. even C++ wizards get it wrong by missing some subtle edge cases. I doubt the language has been able to eliminate that problem.
Yep. I had some hobby C++ experience in the past. But it was C++03 standard, and I was quite comfortable with it. Then came C++11, okay. Then C++14, C++17, C++20, C++23. They add and remove features (like std::auto_ptr) every 3-6 years. And when it comes to reading someone else's code, it only gets worse with all this standard zoo, different code styles, different paradigms. C# also suffers from this problem, its syntax gets updated every year with new release, along with Breaking Changes to the runtime. I find C and Go to be more stable languages.
The biggest problem is the confused notation in cpp. Some times you don`t know what you are dealing, could be anything. C and C++ is really great to do ground stuff, but after that you should probably move to a more modern langauge for the sake of your sanity.
"Just because I write say, lines in JavaScript, doesn't meant I'm a JavaScript developer" We're with you bro. None of us is a JavaScript developer. Nobody understands JavaScript
In a perfect world we are still hunter-gatherer and doing woodwork in free time and there is no electricity. Just natural light and in night you can see stars and everything is beautiful because the polythene is not invented yet.
you can throw some containers and operator overloading on top of that and call it a day, that's enough to make the job done. But that isn't what c++ is about
Bjarne looks like Larry from the Three Stooges. I started off programming in C and C++ around 1999. It's a difficult first programming language to learn. Multiple inheritance. Manage your own memory. Pointers to pointers. Unbridled power but a maintenance nightmare. All the macros are an abomination.
He looks just like how I'd picture the founder of C++
Arguably because these people influenced how we picture this sort of person.
Not the first time hearing this
without hair lol, and the creator of Java still have hairs ;)
Met him at a Usenet conference in Portland and brought up a language feature issue. Really nice guy, he took a definite interest and we corresponded via email for few months, but C++ standards committee people were hot and heavy on this RTTI feature at the time and had no interest in taking anything else on. Even then the so-called standards body was calling the shots, which means he has less influence over C++ than Linus has had over Linux
😂😂😂😂
If the language committee keeps replacing ill-advised best practices with new ill-advised best practices, you can keep learning forever!
He' still learning C++ tho ;)
"Keep changing practices → Constantly create new bugs and unnecessary complexities → Claim that our language is BAD → Claim that we need a new language → Repeat"
at least it's never boring
I mean, why? Just why? And guys keep shoving stuff into C++ too, like it had to support EVERYTHING. It's the most multipurpose language in theory, in practice it's used for the same things but people see those "new and exciting features!" and make a mish mash of them just to produce the most unreadable code hahaha
@@LogenVonSchlenz this should be javascript motto
I worked on a C++ CAD product that was written before C++ had templates..... so they implemented templates themselves, in macros.Wild shit.
Time to rewrite the whole project in c++11
Wow what the fuck hahahaha nice man do you have a link to the project? 😅
@@mbrofoci would rather off myself.. Rust is enough punishment
@@mitaskeledzija6269 proprietary, it's called Part Modeler.
could you reproduce what it looked like vaguely?
I'm a null at C++, therefore I'll put a pointer to Mr. Stroustrup's hair style: exceptional!
🤣❤️ luv this
Yea, and you did not initialize it. Now Bjarne has NULL hair!
use nullptr. Boy.
His hair is all over the floor now, I’m afraid your pointer has created a leak.
i doubt he gets it cut. it’s a life style
C++ is like a violine... with keys, cords, bag hide, cups handler, mouthpiece, pedals and wheels. Strings are only for backwards compatibility and their use is considered as a bad practice.
Let's sumarize : C++ is C--.
@@TheShmupExperiment Not really, Both, languages are good. One of the advantages of C++ over C is you can pass by reference.
@@skilz8098 I don't think you mean "pass by reference" though
@@segueoyuri I'm referring to the difference between these two signatures:
void foo( unsigned* C );
void foo( unsigned& C );
Either one of them can fall flat and that's okay, but at least neither of them are too #.
@@skilz8098 yeah to my C programming mind both are passing by reference, I don't follow. The pointer is going there regardless, no?
I remember my first lecture on C++ at university: prof started his speech along the lines of "in contrast to C, C++ has classes". I was like: "mf, what is C? Did we miss a semester?"
C is much better for education than C++ unis only choose C++ to turn an interesting course into filler content
@@rusi6219 C is much better for enforcing good program design as well.
@@rusi6219i disagree, no one should be learning c anymore since c++ is more functional in todays programming language
@@wasab1tch A lot of people that program low level stuff omit almost all C++ features to program as close to C as possible, if not using C straight away. C also forces you to learn all the fundamentals and understand them at a deeper level, because you don't have anywhere close to as many tools to abstract things away, also reducing the risk of you starting to abstract where it's detrimental and thus builds better habits for the future.
For education in the long run, better fundamentals are key. And a language like C++ that has the tools for you to just gloss over a lot of stuff is harmful to those learning.
And this ignores the whole embedded programming being almost exclusively done in C. And any machine that has some kind of processor in it has the need for embedded programming, so nowadays... a vast majority.
So, stating no one should be learning C anymore... just shows how ignorant one is to how crucial that language is to our day to day live.
@@wasab1tchhe said educational and i heavily agree on that.
C should be the standard intro for coding and since the language is quite barebones you can be competent in a week or less.
I've been using C++ on a daily basis for the past 20 years in game and game engine programming and I consider myself expert level. There are still areas that I've (almost) never touched and I frequently have to look things up even though I use a lot of sophisticated template constructs. Also at the rate the language is currently adding new features, this won't change any time soon. C++: not easy to learn, probably impossible to master 😅.
I had to implement a tagged pointers library on my software to get rid of virtual polymorphism on the path-tracer ... because vtable pointers cannot be shared between CPU and GPU and I wanted to port it to cuda.
I'm still hurting from all the templates and sfinae I used . It was at the same time interesting and traumatizing.
Interestingly traumatizing.
I remember reading a quote years ago from Stroustrop saying even he only understood about 80% of C++
@@Wohlfe😂 I don't understand 80% of what I have written, so let's say I can relate!
I think knowing entirety of C++ is only useful if you are teaching others. Because in reality a lot of it is useless, I ve worked with people who used C++ since 98 and they still dont know all of the language and many dont care about the new standards since they rarely add things that solve their specific problems.
@@filipg4ppl who teach any programming language typically do not understand 10% of it. Rule of the game is to discard any "advice" a programming instructor pushes.
I love your conclusion! I always say that learning a language's syntax is easy, but learning the idioms is difficult.
In the case of Rust, it's the opposite)))
Somewhere on YT is a video from some C++ conference a few years back where we see Bjarne himself failing to predict the result of a few lines of C++ that demonstrated some new C++ feature. I concluded from that that it impossible for any single human to understand C++ and how all its features interact. Even the human that created it and has lead it's development since.
He was asked once how he'd rate his proficiency with c++ and he gives himself a 7. This is not a guy who walked away from the community or retired from its development.
@@dylankun28 I kind of feel sorry for Bjarne, having to spend his life watching the crowd run away with his creation and turn it into a Frankenstein monster. Mind you I had severe reservations about the design decisions made in the original C++, as described in his book on the design of C++ back in the day.
For some insane reason, C++ was the first language i have picked up. Great video as always
In the 90s it was forced down every beginners throat
Me too!! I didn't even know what programming was and in my intro to physics class at my university was using c++. Sure made python look easy 😅
Same, but i got in via gamedev, still have no idea how things look like in 'normal' IT
When I first started learning programing, it was basally C++ or Java... and I wanted to make games, so I learned C++... terrible beginner language, just learn GO instead now.
@@BobrLovr It sure was not. You could always take the left-hand path and dive into Java or worse, Delphi.
For me, the hardest thing about C++ is that you often have to dig through 30 years of outdated practices before finding the current best approach. The language has changed its fundamental implementation guidelines so frequently that two versions of the same program, written years apart, can look nothing alike.
For all the flak that GPT gets, asking it for the C++20 way of doing things its super effective.
I know, it's great isn't it!
Backwards compatibility is the most requested feature of any good language.
My problem with C++ is, I want to know some of those outdated practices. Cause Pointers are truly simpler and easier to know once you get past the initial hurdle of dereference
Smart Pointers arnt it and the whole thing isnt fun to work with and more clunky and more verbose. Then slamming * at the start of stuff, imo
Yes chatgpt helped me learn modern C++ and dare I say it's downright pretty now. So different from old C++ you might come across.
@@freezingcicada6852 dereferencing smart pointers is syntactically identical to dereferencing raw pointers. There is nothing clunky about it. The only verbose part about them is within declarations. I'm fascinated how much hate C++ is still getting for the pettiest reasons.
That was a topic already 20 years ago and despite lots of fundamental improvements since vanilla C++, the "arguments" are still the same as back then
Prime makes a 2 min clip into a 6 minute clip. Truly a 3x engineer.
He fell off used to be at least x10
He looks like Einstein if he had pursued computer science.
More like Doc Brown, c++ just being a thing he passingly invented one day while doing something else
You telling me that ain't Tim Heidecker in disguise?
😅I don't know if Primeagen will see this, but a long while ago I randomly joined a Twitch stream where Prime and Teej were talking about concurrency, parallelism, buffer overflows and something about arc mutex.
I did not understand a freaking word. I then made my next rookie mistake of the evening, by jumping onto Theo's stream where within 5 minutes I realized that I didn't know $hit about JS / TS either.
So I challenged myself to at least understand half of the alien words these guys were saying... by trying to learn C, Rust, and Go at the same time. I still have skill issues when it comes to front end but I now understand what Prime and Teej were saying that day. And I wrote my first web server ever in Rust of all languages. Time will level you up people. Just keep going!!!
Same here I am on my early stage don't 90% of what Theo and primeagen says 😂
Hopefully one day 🤞
Learn one thing at a time and learn well
Life is short, but not that short
@@ANSHU61936 It will make more sense with each passing day. Don't let the AI doom and gloom make you throw your dreams away.
Unironically, if your goal is to be introduced to every programming concept that has ever existed, C++ might not be a bad option.
But in reality, a lot of these things are only confusing because of how many things you don't know, so you look up mutex and it references 'concurrency', 'synchronization', 'primitive', and 'thread', then you look up 'concurrency' and it references those same terms plus a few others, and so on. But none of these concepts are difficult individually or even collectively, you just can't figure out what any of them mean because they all reference terms you don't know.
This is honestly where I think books are way better than internet for learning. A book will have a progression of information, explaining things on top of each other from the ground up. There are internet resources that do the same, but they can be hard to find. Just searching for terms looking for answers to specific questions can be very hard when you don't already know a fair bit about the subject. It's the difference between structured learning and reference material. The internet and searching is great for reference, but reference material is not effective unless you already know a lot.
o7!!!
Reminder: This guy (Stroustrup) rates his knowledge of C++ at 7/10.
7/10!
He is just being humble, guys.
Nah, it's just that C++ is a badly designed language, that's all
@@radadadadee Honestly, it really is not. At least not after the C++11 standard came out. It is useable in a wide variety of settings and of programming styles. Once you realize that you should not use all its features and all its allowed styles in the same project, it becomes much, much easier to program with it.
@@radadadadee It's really not. Actually, it's probably one of the single best designed languages out there, which is why it's been around so long and we're still using it and adding to it. But hindsight is 20/20, and the design from the 80s couldn't see into the future. There are plenty of things that could be better, but that doesn't mean it was badly designed. It's just old. Also like the other guy said, C++ is like Linux which is like 1776. They all equal freedom, and they will absolutely allow you to do things that you shouldn't do, because they don't hold your hand and make sure little baby doesn't hurt himself.
@@kurtmueller2089 Nicely stated but there's more...
@@rameynoodles152 Simply put, well said. 100%. It's kind of like looking at a car from the 1940s and comparing it to a care from the 2020s. The newer cars have a lot more features, many more censors, redundancy checks, etc. Yet under the hood, the mechanics of the engines, transmissions, and drive trains are for most tense and purposes the same concepts. A car from the 40s didn't have anti-locking breaks, they didn't have power seats, windows, mirrors etc. Most of them didn't even have automatic transmissions, most were still manual then. So yeah, it's similar in this regard using it as an analogy of comparisons. If C is a car from the 30s and 40s, then C++ is a car from the 50s and 60s, and so on.
His point makes sense.
Primagen's point makes sense. The video is 90% quite generic.
His pointers make no sense.
Don't think about how long it takes to learn anything; it leads to overanalysis paralysis. Just start learning; that is the only way to learn. Pick some syntax and start building something.
Not even just analysis paralysis, but it ignores the fact that understanding all of the wrong ways to do something is the only way to truly understand why something is the right way.
If I give you a bunch of code of best programming practices in a new language, you’re not likely to take away what actually makes it correct unless you can contrast it with what bad code looks like. Almost everything is valuable to read and learn from.
yep. in my journey i can fluently right crystal lang right now just like how i can write English. once you start understanding the programming language, it'll open up so many doors you never thought possible when you're just starting to learn. time is gold, we can't waste it. learn a language and run with it
but cpp might truly not be the best language for that considering how much stuff is t here and you have no idea what's good, what's bad, how to approach it
Tons of energy your way
He looks like a guy who created a couple of horcruxes while creating C++
4:50 he mentioned all that with "who is appreciating? You, your mother or entire audience" analogy.
Learning Odin was a joy. A single ~1500 line demo file explains the entire language.
What is Oden btw?
@@hetgurjar5836Odin is a programming language..
@@hetgurjar5836the js web framework that comes after Deno
@@hetgurjar5836 A language made by Ginger Bill. It's got a lot of useful stuff for game dev built-in. Compiles to C, making it able to be linked to other projects. Rather straight forward build process and import system. Several game framewoks already supported and included in the vendor library thanks to community effort.
@@hetgurjar5836 Jai's little brother
If you need 40 hours to understand a piece of code, i think the code was bad. I like to quote Terry Davis in that regard "An idiot admires complexity, a genius admires simplicity"
Its possilbe that the code was good, but good code, is code you can understand and maintain easily.
Not always for C++. One reason you might pick C/C++ as your language is to write fast or efficient code. Sometimes this ends up being complicated code because the specific efficiency required needs to be written in a specific way.
He invented a C++ but couldn’t invent a haircut for himself
2:16 "Now if you're a violinist and you want to play a viola." TwoSet enters the chat...
Knowing yourself and how you learn most optimally is always the first step. That first step might take some longer than others to take, but it is the first step in the right direction for all.
Even with that short video, I think Stroustrup fails to mention that C++ is a "multi-level" language, a concept (no pun intended) he often explores in talks/confs. It is much easier to learn how to use heavily templatized libraries designed by other people than learning how to write/maintain that kind of hocus-pocus meta-code.
This aspect of the language is only becoming more salient over time. Between college and my early career, at some point I considered myself a rockstar, guru-class C++ programmer including the STL and the iostreams (popular at the time). Then work switched to enterprise Java and I barely used C++ for some 15 years... then new job/team/projects, here I am back to C++ and I was shocked with how the impenetrable the code was when peering into some advanced libraries written by experts with the latest features, even though I could still write very good "normal" code easily.
The point about reading someone else's code is on point. The interaction with macros, templates, vectors, inheritance, and overloading makes it so that people can accomplish a lot and in a lot of ways. However that makes it so that someone can use all of those features and make some code that looks almost like it is a different language. Then each code base you come across can have that same week-long learning period where you have to figure out how they use all those features.
2:40 That's exactly it! I started to code with C/C++ at uni with a good understanding of the fundamentals and andanced techniques. Around the middle of my studies, I started with web development and got hooked. I've now been working as a frontend developer in my first proper job for 2.5 years. Recently, just for fun, I explored Unreal with a friend because I thought, "Hey, I used to know some C++." I tried to contribute to a small project but barely understood what was going on. Real life coding is much more difficult and C++ is not easy to transition to.
Always loved how Bjarne looks like a cross between Jack Nicholson and Dr. Brown from Back to the Future. One of the few greats who personally replied to an email of mine once. Cool guy.
Christopher Loydd, I got those vibes from him as well. 😂
Mastering C++ is like space exploration: you take one small step, only to realize it’s endless.
1:20 - No way am I gonna read a whole book in a weekend! Even if it's a programming book.
Yes, he would read it in a weekend, for us it is a week.
If you consider an extended weekend , meaning 4 hours on Friday, 8 hours on Saturday and 8 hours on Sunday, you get 20 hours, with 6 pages per hour, you get 120 pages. The "A Tour on C++" is more than 200 pages. So I agree with you.
Just wanna say, for all the junior devs out there just getting started, or for the people who haven’t even started yet.
While Prime, and channels like his are huge in the code community, these guys are very talented, a decade+ into their careers, and have dedicated thousands of hours to practicing and honing their craft.
These are the standards we should strive for, and strive to surpass. But it is unrealistic to think you can be where they are in just a few months, a couple years, etc.
Don’t be discouraged because you don’t code like these guys. Shit is hard, it’s gonna take time. But you’ll get there eventually.
Tons of energy your way
This is why when people take a course or bootcamp from some website and say they can program. I always say, no, no you cant.
5:08 - 5:26 that's when Delphi comes in. It's not the most elegant language and offers almost only one way to do something, but the learning curve is easy. Man, after just one week of learning, you can dive into your project.
True, the aspect that you need to know _how_ languages are applied best is highly underestimated. This is even the essential part of learning programming. Understanding the syntax and trying out a few examples programs from the book is simple. But when it gets complex, or when you need to maintain or use code from others, the real challenge begins.
Started learning C++ couple of times, dropped out on those macros and other stuff people put in there just to show off.
Assembler is easier to read.
Using macros in C++ is evil, just write a constexpr based function instead
I hate how C++ people sprinkle #ifdef in the middle of a class. Just make two different classes for Windows and Unix. Boohoo you have to type a few extra lines of code
@@neonbyte1337 And then spend hours figuring out why it is actually not constexpr.
@@spicynoodle7419 don’t you still have to sprinkle those ifdefs else where then to make sure you are using the right platform specific classes for certain builds? Of course it depends on the situation but if you need them anyway I don’t really see the big deal personally
@@spicynoodle7419 if they didn't, they'd need to sprinkle it throughout the rest of the code instead rather than just in one place.
Though, usually you'd instead have a separate class for both and then #ifdef which of the two gets used.
But ifdefs in the middle of the class are the most efficient way for debug-differences. You can add extra data and functionality for debugging, and then just keep it there in case you ever need it again, and when you build for release, or testing with optimizations, the compiler just builds without any extra overhead that not #ifdefing it would entail.
0:15 - You forgot Haskell or whatever is the hardest of functional ones. Simply because most people only have experience with imperative languages.
Haskell is not that difficult to learn. Its syntax has basically never changed (similar to C), and functional programming is inherently no more difficult than procedural programming. Being a strong type means that it does not have strange implicit conversions like JS, nor does it have hidden event loops or implicit coroutines. You just have to get used to the way it expresses questions.
Not joking or baiting but is there anything now made with haskell Business wise? I only hear about it with content creators. And ive never see any job asking for it
@@joaovmlsilva3509haskell idk but ocaml yes
@@joaovmlsilva3509 In life, more rare some things are, more valuable they are, just find the one that needs it.
Prolly in programming is the same, more programmers in a language, less value.
@@joaovmlsilva3509 Haskell is made for Pandoc
I actually learned to program by reading the C++ manual when i was 15, and then I just read the 5.1 lua manual, but still... it began with Bjarne Stroustrup
Well to understand somebody else's code you not only need to know the language that person chose, you also need to understand what the problem was and how it was approached. The whole "clean code/readable code" vs write a freaking documentation or design report like any other engineering field.
And it also really depends on what you want to do. C++ offers a lot, but most of the time all you need is a damn cake, no cherry no glossing, no stylistic sugar, just some eggs, flour, and sugar and that's it.
Dr. Respect 💯
There's so many ways to eat a soup. Just choose what counts at the moment - speed, elegance, end result? The same with learning and using the language.
C++ to me in a nutshell is this experience I had:
I was leaning about sorting algorithms and we had to find another alg that was not presented in class and to write it in C along with a few others we had seen in class. So I found a implementation of a patience sort in C++. "Well, I've been using C for years now, I bet I can just transcribe the idea and use it. I know how objects work and that's probably fine".
I couldn't. I just couldn't.
Nothing in the code made the slightest sense to me, only the constructors and destructors. I couldn't understand what the code was doing. Like at all.
That day I learned that 1 - C++ is not C with objects, it's a whole different animal; 2 - even badly written C code (as most is) is readable. That well written C++ was not. So I do not know C++.
The thing that makes C++ hard for beginners is not the language constructs or the pointers, it's in the tools and the stuff in error console.
There are languages where you make an error and the IDE tells you what and where it is.
There are languages where you make an error and the IDE gives you 7 lines of brackets of templates and typedefs.
Then there is java
@@deltamico I'd consider Java the gold-standard in IDE support
Until now can’t understand template 😅
@@zakaria20062 Google: Code Project - An Idiot's Guide to C++ Templates (part 1 & 2)
linker errors
He looks like Einstein for Programmer Section.
I have started a couple of days ago using (learning) C++ 20 (pre-knowledge of Python, C, shell, awk ...), and I am really loving it. C++20 is awesome, and easy to do productive programming in a short period of time!
💯, I had to truly try and understand the languages I use. Even after 5years of using those languages
I had learned C in college, graduated in 1991, and after working through a short book on C++, I learned the basics of C++ in about 2 weeks. I learned to read C++ code when working at Gimpel Software extracting code segments that caused PC-Lint to have problems (like segmentation faults) with the STL in 1995.
One of the more interesting concepts I remember finding in the STL was an operator= function in a friend class that returned the class (and not the friend class). I was weird, though at that time necessary. C++ is a bit weird, though it can make certain projects a bit easier to deal with.
I appreciate how Bjarne's been rocking that 'do since forever
C++ has been my primary language for the past 15 years and however much I love it, I do acknowledge that looking at someone else's code can sometimes be quite challenging. Even extremely challenging if they use a lot of template metaprogramming and/or peculiar macros.
I think knowing a language vs being a master with it are two totally different things. If knowing a language were enough, anybody of us could write best selling books instead of writing software if we wanted.
I've learned about a dozen languages in my lifetime. It takes me a couple of years before I really feel comfortable in a language. Like each language has its quirks and idioms, which may differ from other languages. I've been programming Go for about a year now, and I still don't quite feel like I have mastered it yet, there are still things I'm learning.
If you are coming from a language such as Java or Python, be ready to be tripped up by object lifetime issues, dangling pointers/references, unintended copying (e.g., passing a parameter by value when similar syntax in Java or Python would be by reference), undefined behavior, incomprehensible compiler diagnostics, etc. It's not just about the amount of time to get a working program; it's about the shift in your mental model of the way things work.
The funny thing is, C has these issues too. The difference is, they are harder to encounter (if you know what you are doing) and easier to prevent/account for.
"If you are coming from a language such as Java or Python" do not come to C++.
If you are coming from C++, do not come (back ?) to C.
If you are in C, stay in this warm place.
This men is live documentation
2:50, As someone working professionally with C++ for a decade now, even now legacy code is sometimes difficult to follow. But I imagine that goes for most languages. I've also seen some pretty gnarly python scripts used for tooling. You can also really tell that as time goes on people get better at making stuff more flexible/maintainable etc. The newer the code the better it is written usually. Although I do work mostly on safety (class C devices), so rules are quite strict, also when it comes to styling etc.
C++ is easy to pick up and to dive into, but it takes a lifetime to fully master, and even then, when you think you know it fully, it'll still allow you to not just shoot yourself in the foot, but to blow off your entire head. This is one of the few reasons why I like the language. It does as much as possible to not get in your way. It doesn't force you into a specific narrow way of doing things. It's a very powerful, flexible, versatile, universal language. It's a strongly typed scoped based multiparadigm language designed to be efficient, performant as possible. You want to write procedural type code, you can, you want to write functional type you can, you want to write OOP you can, you want to do generics you can, you want to do template meta programming you can. You want to use a bunch of macros and gotos although ill-advised, you can. One of the language's strengths is that you only pay the cost of what you use. If you don't use a feature of the language, there's 0 overhead. And if the code is well structured and well written, then the things that you do use, ought to be super-fast and efficient with minimalistic cost or expense to perform that task or operation. This is from my own personal experience. It's not the best language because there is no such thing. There are many other great languages out there, and they're all viable tools each with their pros and cons. One of the cons with C++ is that the syntax can be atrocious when one dives into using its templating system. It has improved overtime though. I've watched the language change and improved from C++ 98 to C++11, 14, 17, and now into 20, 23 versions. One of the biggest strengths about the language outside of its features is the plethora of available written APIs and Libraries that already exist not including the newer ones being written each and every day by millions of people worldwide. If you don't feel like writing your own functionality, with enough research and digging, you could combine a bunch of different libraries and make a program with minimalistic code you wrote yourself. The only thing with this is you have to consider and know the licenses of the said libraries you choose to use, or you can include no libraries but your own and build everything from scratch. I had a lot of fun learning C++ when I started to learn DirectX, OpenGL and then later on or more recently Vulkan. You can pick up the language over a couple of weeks sure, but it takes a lifetime to master it and even then, you're still learning something new.
I find that argument about many ways to solve the same problem making life difficult and then sighting C++ and Rust bugs. Even in the most simple assembly language for the most simple processor there will be many ways to solve the same problem. It's a non-argument.
It's not really about the "way" to solve a problem and more a rant about the "way" to express it. In C++ and Rust there is 100's of "way" to express something, none of them fundamentally affect the "way" to solve the problem just the syntax and pattern vary which is problematic. On top of that C++ has something that Rust doesn't have that much, is that every of this "ways" of expressing something, comes with a package of subtle differences and edge cases that when combined together lead to widely different experience depending on what features and syntax you used to express something. But If you write C style C++ you get all the benefits of the language with none of it's shortcoming. Like C++ with struct only is fairly easy to understand and debug, compared to C++ with Classes which is ok if you don't use inheritance, but C++ with the whole full pack of 30 different constructor/destructors, templetized and what not with move/forward semantic aware patterns, virtual and inheritance etc is like so complex for no benefits at all unless you are paid by the hour.
@@TheMachina42 OK. I see what you are getting at. However I don't particularly see that Rust is overloaded with different ways to express the same thing. Certainly not as badly as C++ and on a par with many other languages I have used.
I do agree that C++ is so massively overloaded with complexity and consequent "surprises" that it is better to write "C style C++". A couple of observations though:
1) I have found it very hard to enforce this "C style C++" among the members of teams I have managed on largish projects. Somehow all kinds of C++ complexity was snuck in there.
2) Whilst writing "C style C++" keeps makes things more manageable and takes advantage of some nice C++ features it does nothing to help with all the shortcomings of C. Exactly the things I would have expected C++ to have tackled when it was invented. To late now though.
@@TheMachina42 there's no difference between structs and classes apart from struct fields being public by default
@@LogenVonSchlenz I know but just using structs mentally force you to not use C++ features. Which makes programming and especially debugging a lot more enjoyable.
i like how that old guy can actually answer a question. Best case scenario - a few days, worst case scenario, a few years. Why can't people actually bound their answers with orders of magnitude like that these days? Is it cause managers need it exact cause they're unable to handle uncertainty?
His point was exceptional , truly nullified any counter arguments
Prime's example of the logging library seems more a reflection of the library then the language. You may understand English but not be able to read and understand some dense novel.
I noticed you are listening to New Retor Wave kind o fmusic based on the thumbnails at the end of videos you present. : D \m/ Nice!
Best thing about this video is Primeagen saying he spent 40 hours looking at code and couldn't figure it out. Makes me feel like maybe I'm not a moron because I can't make perfect sense of everything I read on Github.
I once sat down and estimated how much time went into the college courses I did on programming and I figure that if you want to achieve basic proficiency (not expertise or mastery, basic proficiency) with a new language that is a similar style to one you already know, it probably takes about 100 hours (two and a half weeks if you make it a full-time job). If you need to also learn a new programming paradigm (procedural, functional, object-oriented, event-based, etc.) along with your new language, increase it to about 300 hours.
I have fond memories of C++, it was the first proper language I learned that could be compiled into an exe. I was about 14 at the time. As prime says, I could write lines of code but i did not understand it. Actually the thing I miss the most is using -> in it. I felt like such a GROWN UP, compared to the other code I had written. I started off with basic on the speccy and enjoyed it but couldn't write my own, just typing listings in. And at some point there was some pascal, and delphi, and borland, all using stuff that I got off cds that were distributed before the bay. But it got real when I found GCC and could make executables and also write mode 13h graphics code, some stuff raw code, some stuff with Allegro.
Skill issue yes skill issue
I too appreciate Go in the same way. even as an amateur, I can look at a proffessionals Go code and although it is more advanced than mine, I understand what is going on
my very first start in programming was in my physics studying... never programmed befor and had to start with c++ and finish a project in 3 months.... that was HARD man but also a lot of fun! Just wasn't able to do anything else in this time :D
I think you have to see it from hiring perspective. When a company looking for C++ or whatever language programmer they already imply of you knowing libraries that popular and used as well. For example if we take JS, I don't really see much of jobs for just pure JS, it mostly some of the React, Vue, Angular or less popular analogs, but I don't really see anyone looking for just JS developer.
There is a certain police detective academy in Poland where they have programming classes and the language of choice is C++. I kid you not. I know because I had to help one of the students with homework. He was completely lost, not even really knowing what programming is beforehand. Make of that what you will.
Big Ooooof
To learn how to code is to learn how to think - someone
Is this a digital crimes department of the police? Why are police learning c++?
@MechPirate That's the thing, I'd say it's simply a graduate school for people who want to join the police as something other than beat cops. (There's probably a name for that.) I guess somebody decided that they should provide some level of IT literacy and that's what they came up with. I may have missed a thing or two, I was focused mainly on helping the student understand what was going on.
if you get good with investigating cryptic compiler messages you can solve any crime i bet
2:25 just so perfect freeze frame man
It took me two days to grasp if statements in python! And now I have to grasp OOP programming and delineators
While Python is one of the better learning languages it still has a lot of junk to produce to get to the underlaying structures that enables programming.
My first book was C++ by Jarne Stroustropp. It is the greatest book in my library.
Took a class with him during my MS. Not the best one at all but the guy is funny and it’s cool to have a PL class that’s not too FP-pilled
I learned C and found it relatively easy. When I decided to move on to C++, I was scared by the complexity and ended up giving up. I decided to jump to C# and I've never been happier.
However long it once took, it's now much less time with the ability to throw any question at AI and get an explanation of how to do this or that back in seconds. Has sped up my learning of stuff enormously.
interesting observation.
This was my first CS professor at A&M
Hard is realtitive! I am picking up C++ took 2 weeks for the Fundamentals. I am retired a Powerbuilder 4GL object oriented language 8 years and Java Programmer 12 years Still learning it, Not
forgetting sub languages like SQL, XML that goes with it. There are endless techniques libraries and plenty of frameworks one must know. The Aouther speaks to the inteligent with his anelorgies.
The use of library are really about application. The problem a lot of learners have is that domain and programming are two separate things.
absolutely!!! Before C++ , Java, Python, ladder logic, pascal, Basic,.... etc all we had was Fortran in college, Oh and also NC machine programming. However I could easily understand all the other " violin string instruments with the brass instrument" languages because I also had Differential Calculus, Physics , chemistry, Vector calculus , Dot and cross product, Laplace, Fourier, Eular, Taylor series Complex equations with imaginary numbers transfer functions and on and on and on Soooo I too can turn a very simple script and make it very very complicated just to get a specific result "solve for x" Sad but true🎸🎺🎻🎷
In 1998 I started to learn C++ in college, I don't know if it was the professor or what but I quickly realized this shit wasn't for me.
It is an amazing language once you grasp its main structures. The problem is students are not being taught programming they are being given very basic language structures and then jumping into software engineering. They simply do not have a good foundation.
The “learn in a weekend” thing isn’t wrong. I’m used to uh, easier to read languages like C#, Python, (now Dart) and I was able to learn C++ in a few days. If you asked me to, I could probably build some ok console applications (with enough time and google ofc), but I could not read actual, production-ready or production code
The legend himself after Terry Davis
C++ is crazy the amount of flexibility it gives you, which is often not a good thing.
As much as I dislike C++, Bjarne Stroustrup seems like a nice guy and his takes are usually very reasonable.
Maybe the language would be less of an abomination if he was willing to act as a BDFL, and rein in the _design-by-committee_ approach. But I recognize that the current way of doing things also has some advantages.
from what i recall of my C++ days the hardest part of the language was implementing classes correctly to handle interitance, RAII and exception handling together, for all modes of possible failures. these features in isolation are easy to implement correctly for but in combination their are a surprising number of edge cases and potential resource leaks to consider. even C++ wizards get it wrong by missing some subtle edge cases. I doubt the language has been able to eliminate that problem.
Yep. I had some hobby C++ experience in the past. But it was C++03 standard, and I was quite comfortable with it. Then came C++11, okay. Then C++14, C++17, C++20, C++23. They add and remove features (like std::auto_ptr) every 3-6 years. And when it comes to reading someone else's code, it only gets worse with all this standard zoo, different code styles, different paradigms.
C# also suffers from this problem, its syntax gets updated every year with new release, along with Breaking Changes to the runtime.
I find C and Go to be more stable languages.
Both his kids are geniuses too.
The biggest problem is the confused notation in cpp. Some times you don`t know what you are dealing, could be anything. C and C++ is really great to do ground stuff, but after that you should probably move to a more modern langauge for the sake of your sanity.
I don't know why but this interview is giving me serious "Interview with programmer" skit flashbacks 😅
Prime: "I couldn't figure out someone's C++ code"
some mf in chat at 3:41 mark: "skill issue?"
"Just because I write say, lines in JavaScript, doesn't meant I'm a JavaScript developer"
We're with you bro. None of us is a JavaScript developer. Nobody understands JavaScript
In a perfect world, all of us would just use Nim for front and backend. It compiles to C/C++ and Javascript.
In a perfect world we are still hunter-gatherer and doing woodwork in free time and there is no electricity. Just natural light and in night you can see stars and everything is beautiful because the polythene is not invented yet.
@@SecureSnowball
And we all die in our twenties because we never find out how to fix bacterial infections. Good times
@@scottwalker4619 One more reason to love old times.
we do need to strive for more liberty
Step 1: read the K&R The C Programming Language.
Step 2: ?????
Step 3: give up on C and learn Pascal instead
C != C++
@@fairphoneuser9009 Every single good feature of C++ was stolen from C.
you can throw some containers and operator overloading on top of that and call it a day, that's enough to make the job done. But that isn't what c++ is about
@@fairphoneuser9009
Because ++ operator has highest priority, expression above is always false 😀
Try latest Angular 18, maybe you'll find it like the Go for the front-end
He looks how old I'd be when I finally learn C++.
Take weeks to learn a language and month and years to be good at it, got it .
Bjarne looks like Larry from the Three Stooges. I started off programming in C and C++ around 1999. It's a difficult first programming language to learn. Multiple inheritance. Manage your own memory. Pointers to pointers. Unbridled power but a maintenance nightmare. All the macros are an abomination.
I still have the book i bought while learning c++ as my profile image. Didn't get to the 1/16th page..
Its been 4 years and i still dont know what a link list is
link list is 1 of data stucture technique that growable
I feel like the older I get the harder it is to learn
I told an intern this summer 3 yrs to get real comfy.
Because experience teaches you what the compiler errors mean.