Relatable. I have been programming in C++ for 15 years and I hate it. But it's still the first thing I reach for when I want to create something (I often work with graphics).
@shivavarunadicherla21 сағат бұрын
Most relatable comment yet. I f*king don't know why I keep coming back to C++ even after trying Rust, Zig etc
@kuhluhOG20 сағат бұрын
47:45 "Any long lived C++ project is hot garbage and not fun" Throw out "C++" and it's still true.
@edwardcullen173918 сағат бұрын
Yep. Still struggle to comprehend how people can't see past programming language as the problem when it comes to large projects. 🤷♂️ The problem of scale is the problem of scale, not programming language.
@heavymetalmixer9112 сағат бұрын
Yeah, it happens in every language.
@my_online_logs5 сағат бұрын
@@heavymetalmixer91 the point is its much harder in c++, man c++ bugs are silent. it willnt show up until you are able to find it. just imagine you manage large codebase, you add something new and break exististing stuff somewhere and it silent. you will think you dont have bugs where actually you has but you are unable to find it
@yessopie19 сағат бұрын
People don't get that the thing that makes C++ fast is the same thing that everyone hates about it: free pointers and manual memory management. Some people say stuff like "Java is as fast as C++ because JIT", no, you don't get it, C++ is fast because you can remove all memory allocation from your inner loops. I recently had to write a tool to scan 10GB+ log files... I wrote it initially with std::string just to get a working prototype, but replacing that with custom string routines that used a pre-allocated memory arena, the program ran literally 10x faster.
@Spartan32219 сағат бұрын
RAII and cache locality help a lot with that, since you can have manual memory management while letting the compiler handle it for you with RAII.
@thesenamesaretaken18 сағат бұрын
I don't hate C++ having pointers and memory management, I hate it being a clusterfuck of syntax with countless different features that implement the same functionality because it has to be backwards compatible with every previous clusterfuck.
@Spartan32218 сағат бұрын
@@thesenamesaretaken That's a requirement for literally any language that's under professional use.
@edwardcullen173918 сағат бұрын
The mentality. Some of us have it, the rest write Java _by choice._
@maidenlesstarnished881616 сағат бұрын
@Spartan322 Even in C, with intelligent resource management, manual memory management isn't an issue. People just need to get in the habit of allocating memory in advance. I just wrote a system in C that receives video streams from multiple cameras and then bundles timestamp aligned framesets and transfers them to another process, and there's literally only two mallocs, and two frees, in the entire system. When your memory management is well done, even RAII isn't all that necessary
@notreduam23 сағат бұрын
writing games is just peak programming enjoyment
@bakakaizoku21 сағат бұрын
Fax, I learned C++ and C# through gamedevelopment (XNA into Unity into Unreal) and am enjoying it way more than my (previous) day job as a backend PHP developer.
@XDarkGreyX21 сағат бұрын
*Recruiter sees gigachad 10x game project on resume* "We don't make games here. Have a nice day"
@sven-o21 сағат бұрын
Its just too much effort for the smallest stuff. Not fun at all, especially if not using your own assets...
@AyushPramanik-m6f21 сағат бұрын
Me personally it’s a headache, I spent more time fixing bugs than making the fun parts of the game.
@juandesalgado19 сағат бұрын
Only if you write them alone
@abrarmasumabir380923 сағат бұрын
C++ is blazingly fast.
@mbrofoc23 сағат бұрын
C++ is a sportsman but on heavy steroids, it's not safe but it's very, very fast
@its_momo_599523 сағат бұрын
Im always still shocked how fast it is
@thewhitefalcon853923 сағат бұрын
C++ is an absolute blast. C++ is blazing fast. C++ makes your friends aghast, when Crowdstrike is a total disast--
@notuxnobux22 сағат бұрын
@@mbrofoc Modern c++ and following common development practices such as assets and unit tests leads to 0 security issues or memory issues in c++. I have worked on several multi million line c++ projects and there has never been a bug/security issue in the code that a language like rust wouldn't have.
@notuxnobux22 сағат бұрын
such as asserts*
@joshuasanders430218 сағат бұрын
"I don't understand the _ naming convention". I don't like trailing _, I prefer m_, but your point was you shouldn't need to do that. In C++ its very important, because you need to deeply understand at a glance what the lifetime of every piece of storage is. If you see "m_", you know that its private, its lifetime is contained to the object you're looking at. If it has no prefix, its a local variable and its lifetime is contained in its current scope. This is not something you want to "jump to definition" every 10 seconds for. It makes reading C++ code 10x easier when you have naming conventions like this. But I can see how someone who doesn't know C++ very well and doesn't have to work in a massive C++ codebase would be skeptical.
@PJutch15 сағат бұрын
I'd argue that syntax highlighting helps with it so it's mostly for naming collisions
@joshuasanders430215 сағат бұрын
@PJutch most standard c++ tools do not syntax highlight that distinction by default. Not even visual assist. And now you're requiring everyone to be on the same tool. No thanks.
@us4tiyny4n22 сағат бұрын
Workaround Oriented Programming is what burns me to the ground. Especially if it wasn’t my code from the beginning, I just can’t…
@User948Z7Z-w7n22 сағат бұрын
It works bro, it works.
@skyeplus21 сағат бұрын
When you're trying to fix something and have to think if fixing this will break logic in 3 other places that depend on it.
@us4tiyny4n20 сағат бұрын
@@skyeplus rather when you read this piece of shit code with 10 comments and #ifdefs around it and have to recreate the history and reasons of these decisions via blame. And then be held accountable for. Not a lot of fun in that, I’m telling you.
@barongerhardt13 сағат бұрын
@@skyeplus Any project of reasonable size and age has that problem.
@my_online_logs12 сағат бұрын
@@skyeplusthruuu, and the bugs is silent, wilnt caught unless having gigachad static alaysys tool, bruh
@crustycrab8721 сағат бұрын
I feel like this author didn't keep up with C++ for a long time. None of the things he mentioned surprised probably like 80% of the people here. C++11 is kinda the default now. And all the benefits he's stating are kinda ... in most other languages? Him being pretty unaware of what's going on probably means he's in some honeymoon phase rn.
@harleyspeedthrust401313 сағат бұрын
Right, and hating RAII is a really strange thing, but I can see someone hating RAII if they've never run into a memory bug. The rule of 5 might feel painful but it saves you from nasty memory bugs. I'm surprised he didn't mention any of the more modern C++ features, like generators, coroutines, ranges, concepts, etc.
@heavymetalmixer9112 сағат бұрын
The default now is C++ 17.
@lanl2qz9 сағат бұрын
@@harleyspeedthrust4013 but a lot of the more modern features after c++17 are absent in compilers, concepts are like the most useful feature since c++20
@itermercator11418 сағат бұрын
I haven't read Zed's code, but the way he talks and people explaining him reminds me of the the exact archetype of C++ devs who write bad and magic code, then get told to stop doing that because nobody else can understand it (because it's gibberish that somehow works) but takes personal offence and doesn't submit, often trying to fight people over the matter hoping to work them down with frivolous attrition and stubbornness rather than be normal and amicable. It's a weird "They're mentally a junior, just better at programming through sheer time doing it" thing
@jacobthornton174520 сағат бұрын
"A quick example of using directx12 api" - the 3d rendering engineer in me started snickering.
@ebn__20 сағат бұрын
What he most likely means by the Python Illuminati bit is that, in a lot of languages that aren't C/C++, if you want to write certain types of software you have to use your own or someone else's bindings for C/C++ libraries, which may or may not be up to date, of varying quality and overhead which makes the process more complicated and annoying than it has to be. In C/C++.. well you can just use the thing and so it feels like you are never hindered and can just make anything and I share this sentiment. It boils down to writing the thing vs writing the thing with extra steps.
@ThePrimeTimeagen19 сағат бұрын
That makes sense
@maninalift23 сағат бұрын
The most fun I've had programming is C++ and a wierd dialect of Basic. The reason being, those were the times where the language didn't have good answers to the things i was trying to do and i had license to just figure out how to abuse the language to do what i wanted. I could think freely without the constant anxiety of wondering what the right way to do things was
@MartinJungblut22 сағат бұрын
This is a huge point. Enjoyment and a sense of there being little pressure on your back is a huge part of what makes me productive to begin with.
@joshuadonahue587121 сағат бұрын
Real
@chupasaurus13 сағат бұрын
> i had license to just figure out how to abuse the language to do what i wanted That's Basic in a nutshell, GOTO goes brrrr.
@ficolas222 сағат бұрын
Will I finish the project? No but I will finish the problem. Im taking that as a personal attack
@TalkToMe2Day22 сағат бұрын
I just took my first class that used C/C++... I loved it. I felt like I actually had to learn what and why I was doing things, not just throwing together built-in functions. I don't know why this made me happier to program, but nonetheless it did 🤷♂️
@bizw21 сағат бұрын
so true king
@proportfolio360015 сағат бұрын
sounds like you're describing the experience of C and not C++;
@comodinoh4 сағат бұрын
@@proportfolio3600learning C++ is so much better if you learn C first
@mmmhorsesteaks20 сағат бұрын
I'm glad he's enjoying C++ but he's just so clearly a crank and probably a bit of a reactionary too.
@guguludugulu2 сағат бұрын
What makes you call him a reactionary?
@megawavez22 сағат бұрын
Modern C++ actually is pretty darn fun to use.
@KayOScode20 сағат бұрын
I agree. It’s like all the benefits of rust, but without the pain during the dev process
@megawavez19 сағат бұрын
@@KayOScode Rust... I felt like I was doing an advanced math equation even if I wanted to do the most simple of things.
@Spartan32219 сағат бұрын
Especially C++20, concepts absolutely fix the template problems way too well,, shame that modules still don't work properly on any compilers though.
@KayOScode19 сағат бұрын
@@megawavez yep. With rust I’d be finding myself checking the binary to make sure it didn’t insert bounds checks where I didn’t want them. And don’t get me started on all the valid code the borrow checker rejected. So annoying
@bersK0019 сағат бұрын
wut
@Miaan1523 сағат бұрын
C++ MENTIONED !!!
@MCroppered21 сағат бұрын
What’s the point of this?
@Miaan1520 сағат бұрын
c++ is my copium i love it
@anguswetty18 сағат бұрын
C what?
@Bleeeeeeeeeeeeeaaaah16 сағат бұрын
@@anguswetty plus plus
@13thxenos21 сағат бұрын
This Zed Shaw guy is such a character. He wrote some book about teaching programing, and his method was to type every code in the book. That was it. He is also someone who hated Python 3 breaking compatibility with Python 2 with a passion. So much so that he lied about Python 3's faults a bunch of times and stuck to Python 2 like a tick. Or maybe he was being dumb, I'm not sure.
@itermercator11418 сағат бұрын
Sounds like the pretentious academic archetype with that book, I had control systems engineering books that were exactly that, nothing was explained, it was basically a magazine of example equations with no explanation why or what. As for the Python thing, C++ people are weird like that, it's so dumb and part of their (quite honestly, r*tarded) view that a language needs 50 years of backwards compatibility despite massive changes in goals, designs, paradigms, environment, tooling etc. C++ still has crap systems like header files simply because 50 years ago compilers were only single pass, give give an example.
@JasminUwU14 сағат бұрын
Interesting person
@dexter931322 сағат бұрын
I've used C++ through all those phases, the current phase we're at is clearly the best. It's still my language of choice for anything compiled.
@Exilum15 сағат бұрын
42:25 More than two different perspectives on the same problem, I see it as the same perspective expressed differently. Guillermo says that HTML isn't good enough, HTMX says HTML is good enough *with some additional interactivity*. Guillermo doesn't imply that you should use react specifically but JS in general (or WA if it tickles your fancy). HTMX is enhanced HTML by the means of JS, it does fit that definition.
@eheh574823 сағат бұрын
C++ is so fun when programming small games, to be honest I haven't had any similar experience with other programmng langauges. I have never experienced what it is in a company-ish code base but I am so grateful that I came across c++ as my first programming language, it taught me so much
@yimyim11723 сағат бұрын
I'm working in a big company using c++ as their backend system and I can tell you it's an utterly chaos. Millions of lines of code without proper coding-guidelines makes you feel like Tarzan swinging along the vines in the jungle. It's still fun though.
@godslayer790520 сағат бұрын
@@yimyim117 sound like hell to me
@skyeplus20 сағат бұрын
"It made me the coder that I am today..." For me it was Python, when I learned mindset of "just do it" and became a better C++ programmer. Then lately it was Functional programming.
@ProjectVastness20 сағат бұрын
I'm almost 44 years old, I started with pascal, C/C++ and COBOL when I was like 14/15 years old. And man I must be honest C/C++ and functional paradigm languages for me are still a pleasure to work in/with. And yeah the hardship of building working stuff more than 20 years ago it was also more fun than today honestly. But hey this is just my way of working and opinion. Today people do some block of code and others pick it to add more stuff and the others do the same and so on. I understand that in some jobs/cases it's mandatory and necessary, but I believe that at least 40% of stuff wouldn't needed to be like that.
@LARathbone22 сағат бұрын
Oh it's Zed Shaw. That makes this all make sense
@gokusaiyan112818 сағат бұрын
does he have a bad reputation ?
@LARathbone18 сағат бұрын
@gokusaiyan1128 Not a "bad" reputation per se but he's the author of several books and has been long known to be very outspoken and have some very controversial opinions. I don't really mind this piece as a whole and I think this is mostly a matter of opinion and actually don't disagree with a lot of what Zed says here. I'm just saying that knowing it's Zed Shaw gives a lot of amusing context to all of this.
@RandomGuyyy17 сағат бұрын
He's a proponent of doing things The Hard Way.
@Ch40zz21 сағат бұрын
"I really hate RAII" what the heck dude? That's one of the best features of the whole langauge so you dont have to retype 20 Free(X) on error return when you do system programming with the OS APIs...
@Spartan32219 сағат бұрын
If you know how to use RAII, it protects you from memory leaks by forgetting to free the memory because you returned in an unexpected place.
@yimyim11718 сағат бұрын
RAII also enforces a better system design because it hinders the init() style programming that is typically done in c
@PeteMcGo22 сағат бұрын
I've had this kind of blast when I recently got into ROS2 and had an actual physical robot at hand to try the stuff live
@mage369020 сағат бұрын
I did that in community college. Most fun I've ever had, in school or in programming. The prof hated me, though. Turns out ABB PLCs have no protections against infinite loops and I discovered the jmp instruction and created an infinite loop with it. It ruined the OS and a good fishing weekend for my prof when he tried to fix it.
@Georgggg22 сағат бұрын
You can only have fun programming, when it just works, and you can focusing on solving REAL problem, not 50-lines-compiler-error-message problems.
@YaroslavFedevych19 сағат бұрын
Okay, Prime reacted to Zed, I can now ride into the sunset
@Nickname86318 сағат бұрын
My art teacher drew on the drawings i was doing to show me where to do something different, very respectful 10/10 They also would grade me bad for trying to follow the "advice" given. Still recovering from thinking i am incapable of doing art
@Kiyuja18 сағат бұрын
27:55 when the deaf kid tries to warn the class that the bullied emo kid is reaching into his bag
@robmorgan121416 сағат бұрын
Holy s--t...😂 that's EXACTLY what happened. Please someone turn that into the short that forces prime to visit HR and explain his ableist actions.... can't WAIT for the inevitable apology video 😂😂😂😂
@burarum121 сағат бұрын
Only weird people use tensorflow nowadays and clinically insane people use the C++ API. Pretty sure this guy has absolutely no idea of the current status of ML/DL development.
@marwan761418 сағат бұрын
what's being used currently ?
@burarum118 сағат бұрын
@marwan7614 Pytorch mostly and maybe Jax (and jax based frameworks) atleast at google because it is a google product, sort of a successor to tensorflow and compiles for TPUs. Jax is quite popular also in research because it is very flexible.
@burarum117 сағат бұрын
@@marwan7614 Pytorch mostly and maybe Jax. Don't know how much Jax is used in production really but it is relatively popular in research because it is very flexible and I would assume that it is used at google since it is a google research product.
@my_online_logs12 сағат бұрын
nothing wrong with tensorflow. tensorflow is also google product.
@THEapphacker22 сағат бұрын
This blog post is stupid. The author clearly has issues taking any feedback and his arguments make no sense in the context of writing code. My favorite part of this video is prime realizing that this blog was a total waste of time to read.
@squishy-tomato14 сағат бұрын
that doesn't matter cause he's 6'2"
@la.zanmal.2 сағат бұрын
I knew that like over a decade ago. The guy is kinda infamous in the Python world.
@paryonix3d665722 сағат бұрын
I don't always have fun with the language itself but developing my own game engine in C++ sure was a lot of fun. Also there isn't really much of an alternative for that kind of thing except for C. The language itself got a lot better over the years, its simply a huge toolbox - you are not forced to use everything. It gives you the freedom to pick your own style, that's what I like about it. It's a multi-paradigm language, which most people seem to overlook.
@AnonUser-b6y21 сағат бұрын
Most C++ haters dislike that it doesn’t forces specific paradigm. An “opinionated” single-paradigm language is better for online debates because you can just claim any problem that doesn’t fit the paradigm is invalid.
@kiseitai221 сағат бұрын
To Rust or to C++, that is the question. I prefer the simpler syntax of Rust (when keeping lifetimes to a minimum) but I still use C++ in my websocket backend. C++20 at the moment.
@demolazer22 сағат бұрын
I'm obsessed with programming (and autistic shockingly enough). I love it more than anything. Work projects can be boring or stressful sometimes, but side projects are gloriously fun still
@cyberdrace17 сағат бұрын
His point about art is essentially correct, even if it's explained badly. Good art teachers make their students throw as much of the painting onto the canvas as early as possible so they can move on to the next one quickly if it's not going well. It's easy to waste time in the messy middle stage instead of just finishing what you have and learning from the end result.
@Zuftware16 сағат бұрын
This is not the point he making. His point is that dumb art teachers never seen painting in progress before. They probably did, have pretty good idea how it going to turn out and seen same mistakes many times.
@aboliguu11686 сағат бұрын
Complaining about C++ is like 95% of the time a skill issue. Sure it has it’s problems but as a huge and complex language, it is difficult to master and requires a lot of knowledge and principle from the programmer. People saying ”C++ is fun for small games but not for larger projects” probably just don’t have the experience to do a large low level project, period.
@Zuftware3 сағат бұрын
It is impossible to master. Proven again and again by each new segfault, cve and crowdstrike...
@aboliguu11683 сағат бұрын
@ it’s impossible to write perfect unbreakable code in any language. Rust doesn’t allow memory errors but brings a lot of drawbacks with it. No language is perfect, obviously
@Zuftware3 сағат бұрын
@aboliguu1168 Skill issue
@Guiriloo20 сағат бұрын
He not selecting the first letter and the last one of all marked text is driving me crazy
@la.zanmal.2 сағат бұрын
Browsers commonly freak out when you try to select all the way at the start or end of a paragraph, and include a whole bunch more, even the entire page.
@womiro14 сағат бұрын
I just have read this blog shortly before I got the popup for this video, and you spelled out my thoughts on pretty much every point you mentioned. Your commentary is much more entertaining than my inner voice, though.
@ZT1ST3 сағат бұрын
@14:12; The way I read it, it was that "Java is so boiler-plate-y *already* that it discourages people from using boilerplate abstractions, because those abstractions are even *more* boiler-plate-y.
@kuhluhOG19 сағат бұрын
57:40 The reasoning about encoding stuff like scoping or even semantics into a variable name is relatively simple: You can easily know the semantics of the variable at a glance. If you are properly following such a naming convention (e.g. all member variables have a trailing underscore or the more popular m_ in front of the name, or g_ for globals etc.) you can very quickly understand the meaning (or potential problems) behind certain things without the need to move your cursor or mouse to the variable and e.g. go to definition or similar. One can even encode other meaning into variable names. For example if you are dealing with multiple coordinate systems in your application one can give different prefixes for each one, making a lot of things kinda trivial (although encoding it in types would be better if possible, but that's not always the case).
@SabbraCadabra1122 сағат бұрын
Drinking game level impossible: take a shot every time Prime says "let's see"
@Exilum15 сағат бұрын
39:25 I couldn't disagree more, it's specifically because it's in the middle of it that these criticisms are so valuable. You are free to ignore it as a student, but if it ends up not looking right, you know why at at what moment you screwed up. It's easy to feel something is wrong and notice the wrong flaws on a finished work, flaws in the process are more likely to be right.
@Exilum16 сағат бұрын
9:10 I have a terrible, terrible syndrome of both liking easy abstractions and wanting to take these easy abstractions and make a difficult abstraction on top of it, and not necessarily a neat one, just one that I find fun. One of my latest "fun" projects involved making a simple server. Instead of just using express, I built an entire typesafe system on top of express that would generate pipelines in function chains to handle these requests (check if the shape of the data in is right, check the values, transform the values, return a value, each stage called generating a new object with a set of functions, even adding the ability for adding as many assertions as you want on top of the pipeline that would be used just before starting the server, taking advantage of Javascript's scheduling to know when the chain is over). I then added an export function that used the data of the generated pipelines to create a ts file that could be imported on the server and used with another library I created for the occasion. Overall, instead of using express and calling the express server, I created two libraries for no reason other than for fun. Including debugging and stuff, these are a good 50 hours I can never get back and I don't regret it one bit.
@nuvotion-live9 минут бұрын
I was a React Andy, now I’m rewriting my app in C++. The FPS is 6x faster and I’m shocked to learn C++ tooling is actually easier than the node_modules transpiling to an interpreted language nightmare that is the web. So happy!
@nuvotion-live7 минут бұрын
Oh and the UI is just instant. Done drawing by the time you release your mouse. No more useMemo redux hooks bs
@justBri12312 сағат бұрын
I've bought a few of Zed's courses and they're great! He's a really smart dude and this is such a good article
@titfortat440521 сағат бұрын
This reads like the author is deeply suffering from Stockholm syndrome. "This means that C++ the language--and C++ the community--simply Does Not Give a Fuck what you do. Do you want to write a matrix library? Go for it. Want to make a GUI library? Go for it. Want to write a game engine? Sit on your couch in the dark and go for it. How about a weird game that watches you code and makes fun of you? Seriously, nobody cares and most people think it's hilarious or fun." The "DGAF" attitude seems to be the crux of this argument, but I don't understand why one couldn't write a game engine, GUI, matrix library in C or Rust or Zig or Ada or any other language. And the author doesn't bother to explain any further. There's a huge difference between "nobody cares about what personal projects you're making" and "people will care if you're trying to influence the direction the programming language evolves" which seems to be his gripe against Rust and Python (His examples linked about Rust and Python weren't "people doing their own thing" but people trying to make their "thing" part of the ecosystem). Also he seems to have a personal vendetta against Python 3 from my research? Weird article written by a weird guy. I can't imagine anyone who hasn't already spent 5 years working in C++ would actually enjoy using C++ over Zig or Rust, or even C.
@johndoe2-ns6tf20 сағат бұрын
"attention everybody: i have just wrote or rewrote X in Rust. Rust is the future. Rust is blah blah blah." .... every rust dev ... the vegans of the dev world ... waiting for the approval of the others veg... i mean, rust devs.
@titfortat440520 сағат бұрын
@johndoe2-ns6tf I didn't even single out Rust; you clearly have some kind of inferiority complex. You're probably emotionally damaged from years of C++ abuse. The article needs to be re-edited to say : "This means that C++ the language--and C++ the community--simply Does Not Give a Fuck what you do (unless you're doing it in Rust which in case they will hate you for it).
@radadadadee20 сағат бұрын
I believe that the whole C++ community has some Stockholm syndrome, or at least a "sunken cost" problem where they invested too much and now they're afraid to move on. C++ is just such a clusterfuck that the best you hear from it is "well, modern C++ is not as bad anymore if you restrict yourself to this section". Just give up guys! There are better languages nowadays.
@titfortat440520 сағат бұрын
@johndoe2-ns6tf I didn't even single out Rust, so your insecurities are showing big time. The Rust haters at this point are more annoying than the Rust evangelists. The article needs to be re-edited to say : "This means that C++ the language--and C++ the community--simply Does Not Give a F what you do (unless you're doing it in Rust which in case they will hate you for it).
@Spartan32219 сағат бұрын
You're talking to one right now, I hate Rust and don't find Zig compelling, and I'll always love C++ over C. I also spend some of my free time reading the C++ proposal papers for fun.
@christopher864113 сағат бұрын
my full time job is writing rust code. I love it. I dont necessarily love rust, I just love the labor of programming. A language is just a tool for me to produce something, and I find myself to be most productive when I can base things in the strictness of rust. A language is not your identity.
@skilz809814 сағат бұрын
The common consensus that I've been seeing around the web about C++ for best common practices are that if something is trivial then try to keep it simple. If you don't have a reason or a specific need to, try to aim for the rule of 0. Otherwise, if you do need to have a custom constructor and or destructor, then you need at least the rule of 5 and potentially the rule of 7. One of the main things that does get in the way of this rule of 0, return optimizations are that strings in C++ are generally not trivially. One of the biggest improvements in C++ from C++11 throughout at least C++17 was the introduction and use of constexpr, lambdas, variadic templates and expression folding as well as a few others.
@dddderick21 сағат бұрын
🤯Prime, what was your name on Graal? I was on LAT and GFX (Level Admin Team & Graphics Design Team) back in '99-'01 ... Personally worked with Tyhme and Krakken.
@delistoyer5 сағат бұрын
9:45 Ironically, this is more of an issue with compiled languages like C++ or wrappers around them. With dynamic languages like Python, you can easily patch a function or method yourself without needing to recompile. That’s what makes dynamic programming languages so much more enjoyable-you’re not tied to the decisions of the library maintainers. Even if the function or method isn’t technically "broken," you can still patch it to behave the way you want. You can monkey-patch it to work differently in just one file or across the entire library, all without having to recompile anything.
@maddyv594822 сағат бұрын
I started with c again a few days ago. It's soooo much fun! I'd forgotten what it felt like, making little toys and contraptions and seeing them come to life.
@trapexit19 сағат бұрын
"_foo" = member variable, "foo_" function param variables, "foo" local variable. I disagree it is not needed anymore. I don't want to require a LSP to understand my code. I don't want to have to hover over something to see where it comes from.
@MichaelPohoreski3 сағат бұрын
100%.
@tonygluk1Сағат бұрын
Conventions differ. I've personally never seen special naming being used for function parameters, but have seen a trailing underscore being used for members.
@roberthoople18 сағат бұрын
UI/web absolutely bored the crap out of me after I built my first website. Even though I was doing PHP and JS coding (in 2008), I got away from it and thought I disliked programming. But then I started writing C++ on microcontrollers, 4 years ago, and I freakin love this stuff!
@PJutch15 сағат бұрын
I like that C++ is kinda simple. Like it isn't easy and it has a overwhelming amount of wierd special cases and other shenanigans but at its core it's in some sense straightforward. What is the no-brainer way to parametrize one type with another? Let's just compile parametrized types with all arguments it's used with. How do we know which arguments are used if, like, parametrized type is used in a parametrized type? Let's compile them lazily when we see a usage. And that's basically templates. Like you can do all sorts of complicated stuff with them and they are covered with all sorts of wierd (mis)features but conceptually they are simple then generics in most languages. Like I won't say whether C++ is good to use but it's interesting to learn.
@conman764414 сағат бұрын
I know a fair bit about painting ... if your composition or construction is off in the beginning its going to be impossible to fix in the end, you will sink hours of work into something you will possibly scrap because the underlying work is crap. A good painter will more or less have a crude variant of the complete painting already at the first lay-in, you can see what it represents clearly at this stage. The rest is then adding effects for a finished look. There is no "ugly middle" stage that look like crap or is messy. You have started painting without a clear idea of what you are going to do.
@sorenfirestar265712 сағат бұрын
sometimes feed back is not about being correct but about getting you to look at something differently then how you have been looking at it. Most of the programmers at my work are better and been there longer but by talking through an idea and me sometimes giving wrong stuff they "knew" didn't work but never tried it makes them think about it differently.
@alexandrustefanmiron772321 сағат бұрын
You forgot to invoke it [](){}() or, even better, why not mixin some templates [](t value){}()
@Spartan32219 сағат бұрын
[](auto value){}() Immediately invoked lambdas are actually exceedingly useful to get performance and take advantage of compile-time effects.
@romangeneral2322 сағат бұрын
C++ for life
@Hassanjoraid9 сағат бұрын
I make game engines and video games with C++, stuff like opengl / vulkan (started 3 years ago) and I really enjoy it. I never got deep into another language which somewhat invalidates my opinion as its hard to see the "wrongs" of a language without knowing many others, but the only annoying thing I see with C++ is the ambiguous error messages at times, and maybe the standard library overly heap allocating in debug mode (but that's not really a c++ thing as you can always just make your own strings, vectors, etc). im really glad i went to a game programming college that threw me in c++ without concern for other languages, I dont know how much I would have liked programming if I went the CS route and had to start out with very high level languages and doing stuff other than game/engines related
@nickstanovic23 сағат бұрын
I like to see how I can break down a problem and solve with Powershell, Python, and JS automations to make work fun. It's not a programming job but can benefit from scripting.
@diadetediotedio691819 сағат бұрын
12:39 I'm sorry, stop. This is getting bizarre, it is not like programming was different from that, we have metaprogramming since almost the start of programming being a thing, and we have reusability concerns since ALWAYS, literally functional programming is something that heavily induces composability and reusability and generics and it exists for more than 80 years now. Just because you think something is overused it does not mean you can or should call for it as some sort of "big problem in programming", it is the same problematic thing as projecting your "fun past" into the present and saying things degraded (a thing you by yourself criticized). Well, anyway, I'm just kinda pointing this out.
@Exilum15 сағат бұрын
56:00 To me it looks really fun, except the accessor. But I'd probably enjoy implementing that syntax more than using it.
@FringeGames18 сағат бұрын
What are the final 2 constructor types in the Rule of 3/5/7/0?
@PJutch15 сағат бұрын
55:55 it's a wierd thing about C++ that you can make it very very pretty and easy to get a general sense of what's going on but understanding details or modifying it is hard
@AsherMancinelli16 сағат бұрын
Unique and shared ptr are not on the stack, they are basically managers for heap memory that automatically free their memory through raii. Dynamic memory management on the stack is done with “alloca” usually. I love c++! It has its warts for sure.
@TheYinyangman14 сағат бұрын
UI -> fixing font weights and padding on buttons
@schrummy1421 сағат бұрын
General question.... what is the hate with `this->`? While I was in college, I wrote a lot of simulation code and I guess I have just gotten use to seeing it...
@CaleMcCollough7 сағат бұрын
This is EXACTLY why I made the Script2 C++ API to replace the C++ std library with a more vanilla hybrid embedded C++ approach with optional dynamic memory and RPC for heterogeneous multiprocessing. Chinese Room Abstract Stack (Crabs) Machine is whats up!!!!
@FryGuy101318 сағат бұрын
The trailing underscore thing is because, as usual with C++, people have a good idea (prefixing member variables with an underscore) and then C++ finds a way to fuck it up because variable names aren't allowed to start with an underscore because of some standards bullshit. So now everyone uses underscores at the end which kind of defeats one of the purposes of them which is to put member variables at the top of the intellisense listing so you can just type `_whatever` and get the member variables instead of all the variables. And they're much harder to scan and see the underscore at the end than at the beginning.
@phoneywheezeСағат бұрын
you can start variable names with underscores but the problem is a lot of internal libraries use underscore and double underscores so there's a high chance for variable collision
@alexpyattaev4 сағат бұрын
Both JS and C++ have very high density of footguns. Is that what makes them fun?
@mmmhorsesteaks21 сағат бұрын
As a python guy, I can't tell you how profoundly unimpressive this standard library is.
@Zackmortar14 сағат бұрын
why do you select text 1 letter after the start of the paragraph and 1 letter before it ends?
@-_James_-20 сағат бұрын
I first learned to program back in 1983 when I was 10. Started out in BBC Basic, moved to ARM assembler in the late 80s, learned C in the first week of my first real job in '92, switched fully to C++ around '99. Still there. Use it at work, use it at home, on pretty much every major platform out there. My resume has maybe a dozen and a half other languages listed that I can resort to when I must, but I rarely need them. Programmers these days are regressing in their knowledge. Their mentality now seems to be if there isn't a library for it, it can't be done. "AI" is definitely not going to help change this.
@JoFSa16 сағат бұрын
Hey, I also started with BBC Basic when I was 10; it was 1984. Learned C++ on-the-job in 1997 and have used it professionally and for personal projects ever since. Not only do I love C++, but I also love working on the kinds of projects where it makes sense to use C++.
@nightshade42716 сағат бұрын
I'm having a blast in C, creating a framework called MACH (mustach, alpine, c, htmx) and is fully async, when used to create a webapp you do no allocations, memory management, pointers, or buffers to worry about, feels like a js/ruby/go framework. Supports HMR, sqlite, libsql (turso/local_replica), postgres, fetch (curl), sending emails, background tasks (sorta like sidekiq, resqueue, etc), telementy (sentry/open_telementry), and can compile to single file self-contained executable
@my_online_logs5 сағат бұрын
send me the repo, i will find the bugs if you are not able to find it 😊😊😊
@kuhluhOG20 сағат бұрын
23:02 The only good thing which Microsoft does for developers which come to my mind is that they actually translate their documentation into multiple languages.
@EMB3D14 сағат бұрын
27:38 you started to freak out too soon. These are not yet DX code but good old win32 code. Also the defines are still capital everywhere, but yes class names can be capital. Vulkan all the way!
@Paschendale221 сағат бұрын
Graal mentioned!? I haven't heard that name since 2004
@dddderick21 сағат бұрын
Dude! What was your name? I was mostly gone by 2004 but were you there prior? (1999-2001?)... Before player worlds and all the other forks happened?
@Paschendale219 сағат бұрын
@@dddderick I don't remember. I had an account but was deep into other games instead. I used to go over to my friends house and watch him play it for hours lol. Around 2003-2004 probably
@ParkourGrip19 сағат бұрын
Did we just prove that: lim [t -> ∞] cardinal_number(every_cpp_constructor) = ∞
@Telopead20 сағат бұрын
I don’t like how this guy put it, but I do share the sentiment. Modern c++ is actually really great and fun. While i admit I am much more productive using other languages, c++ is my go to when experimenting on my own time.
@benitodifrancesco725419 сағат бұрын
Thoughts on open ai o3?
@kevinshin713111 сағат бұрын
All member functions within a class get's implicitly passed the (this) pointer, and you can reference anything within the class without having to do this->.
@scififan69822 сағат бұрын
when you look at a library like e.g. Clay (the UI layout single-header C thing), you see what this guy means. I agree
@rocapbg951821 сағат бұрын
I don't agree that the scope of what you need to do has increased so much that you have to use libraries for everything. Besides web apps I've found that I can build pretty much everything I'm interested in from scratch. A game, a compiler, a small messaging app, etc.. Even though you can probably find a library that will do everything for you, you don't have to use it and it's much more fun when you don't use it.
@allancomar20 сағат бұрын
Win32 APIs always had the capital letters. it was introduced on windows 3 as a pattern. and all stayed like that.
@PJutch15 сағат бұрын
Hot take: fun of programming is inversely proportional to the number of libraries used
@Glozzom19 минут бұрын
C++ is the language I know best, I've been writing it for 6 years, and I still don't know C++. As he said in the article, there are like three languages in one, the 'C' way, the 'templates/classes are great!' way, and the (the only way I can describe is) 'modern' way. I find myself using the 'C' way, because at least I know how it works, kind of. Its not like I don't appreciate the new features, I just don't know how tf they work frankly. Every time I find some new functionality from an example that uses std:: whatever, I study it, and maybe even use it. However I am cautious to mix it with structs, raw pointers, etc, because the amount of things that could go wrong, and not being in the mood to RTFM about how it works under the gnarly veil. Spot on with the terrible errors, build tool complexity, and I haven't even dealt with RAII, so new fear unlocked, but overall 9.5/10, because everything is terrible, and +1.5 for letting me write code that is fast as hell, and shoehorn-able into almost anything (hardware included).
@bjornoid52717 сағат бұрын
My favorite in school was c++ between c#, java, python, SQL, MatLab, and HLSL
@nehemiah628019 сағат бұрын
As a 17 year old who's been learning c++ all of high school I think it's pretty nice I enjoy it a lot more that C#, and Java
@Jack-b4s3g20 сағат бұрын
Those pipes are a "new" thing that takes time to get used to.
@valcron-100016 сағат бұрын
Rationalizing an emotional decision: the blog post. Imagine picking a language based on what some random on the internet says...
@koksem22 сағат бұрын
C++ is like F1, incredibly fast, but just as dangerous.
@Spartan32219 сағат бұрын
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off" - Bjarne Stroustrup
@ldov637319 сағат бұрын
@@Spartan322 people always throw that quote around but what does it even mean
@Spartan32219 сағат бұрын
@@ldov6373 It means that C++ has a lot of ways to avoid the problems common in C that blows up the programming, but when you do occasionally find one, its probably worse then what'd happen in C.
@Sebo.16 сағат бұрын
@@ldov6373 for example, in c it's easy to create a use after free; in c++ you think you are safe if you use for example references and not pointers (since references can't be null) but since references are just wrapper around a pointer, if your data structure gets reallocated your reference gets invalidated and accessing it is still accessing freed memory but it's a lot harder to recognize or find. The Cherno has a video with an example, i think it's "Stop using std::vector wrong"
@squishy-tomato14 сағат бұрын
@@ldov6373 it means Bjarne doesn't have legs
@ZT1ST4 сағат бұрын
@5:47; Dictators: "I'm not being an authoritarian - I'm not dictating your public life, I'm only dictating your life within the bounds of the borders of my territory." I'm just saying, "Authoritarian" fits for an open source library maintainer. :p
@simontist21 сағат бұрын
Read the title as "C++ is an Absolute BEAST" and nodded
@alexanderoestreicher355721 сағат бұрын
AAAAAH graal mentioned! I wrote my first code in graal as well in the level editor. 4:55
@gh0stcloud49919 сағат бұрын
17:20 I hade the exact same reaction when I read the lambda paragraph lol
@dexterman636121 сағат бұрын
I tried other languages a little, but I gotta agree. C++ was the most fun so far. And am thakful to have a C++ job. But the committee really needs to make the language better.
@ZeZeBatata6918 сағат бұрын
37:50 I love how Prime and all these guys don't know who Zed is.. 🤣🤣
@groknet21 сағат бұрын
The joy of solving a problem with the debugger is addictive like a toxic relationship 😅
@3lH4ck3rC0mf0r712 сағат бұрын
The moment a programmer unlocks true godmode is when they finally figure out that C++ is actually a high-level language, and they start digging into the bowels of memory accesses, CPU registers, cache lines, microcodes, profiling every last microsecond of execution and comparing the disassembly from several different compilers and every significant and insignificant source code permutation, becoming a demoscene coder making N64 games in 2024... ...And then they leave society behind and raise a farm. I'm just gonna write all my server logic in unsafe C++ and drop it into cgi-bin until the day I die, thank you... Hmm. I think I smell something burning. Meh, must be the wind.