I've been into C++ for a long while, so I follow game developers and C++ experts and compiler implementors and C++ standards committee people on Twitter A running joke among them is that if you feel like you know C++, you don't know enough C++, and after many years of experience you know enough about C++ to understand you don't know enough C++ I also joked about not even standards committee people not knowing all of the language, and an actual standards committee person replied to me saying they actually don't know all of the language
i saw couple things about c++ on ytb (a video about c++ new stdlib releases, templates, a video showing some standards, compiler reflection, smart pointers, )and more stuff (btw i barely coded in c++) and thought to myself(barely know c++, coded a bit in py, java and go) hmm ill give it a year and learn most of tthe language(it sounds complete whatever that means) well now i know better to not do that)
That was real for me. First eager to learn the power of C++, second feeling confident and third realizing the language is a minefield and go back to Rust where the compiler holds your hand like a child you are.
@@NotherPleb Admirable honesty from a Rust enthusiast (Rust users are called enthusiasts). Me, I'm a badass so I only program in C. And by badass I mean that my code is bad and smells like ass. But what are you going to do when you were born an uncompromising bonehead.
@@isodoubIethe means that C++ gives you tools to reduce footgubs by a pretty large amount. However, when you fuck them up, they make really hard problems to debug. It's not really about ub, any language that needs performance requires ub (rust included...). For example, instead of manually handling memory, you can use contructor/destructor pairs to allocate and deallocate memory for an object, making it less likely that you get memory leaks. However, if your class is movable and you fuck up your move constructor, your error will be harder to spot that if you used C.
@@vercolit Yes, I know that, but I still disagree -- the complete lack of structure in a C program will usually make it harder to debug than a C++ program that does the same thing. You'll still need to "move" things in C; the same semantics will be there if you want the program to behave comparably. The main difference is that C++ makes it _possible_ to make programs that would be too complex to write in C. Finding errors in such programs will be hard, but it's not the language's fault.
Just to clarify, there are of course more reasons why Google can't keep up with other companies. Btw I know I've made some negative videos about Google, but that's just because the negative stuff is more interesting to talk about. I would say my experience at Google was 90% positive, but I think there are enough videos out there talking about the WLB, free food, etc.
I think there is a video on youtube about C++ style guidelines at google , so I can understand why you feel that way! As I am a java guy but I am currently learning oops in C++ . I do find the differences . Like there are some concepts like operator overloading , default parameters which are not in Java (and Java has a reason for not having them). But I still love java ,cause it was my 1st coding language, so I am kind of biased towards it.
The problem with C++ at Google isn't any different from other companies in essence, only in scale, namely for every 10 developers there is at best one person with adequate expertise. Just like other companies Google tries to rectify it with guidelines and bureaucracy instead of hiring real experts and letting them run free.
It’s the other way around for me. I program in Python and use C++ at leetcode, because C++ is much more explicit and easier to understand. Python is the most obscure language designed for small scripts. A large Python codebase is a nightmare to support.
Personally I find a large C++ codebase more readable than a large python codebase, my exp is from working in aerospace where C++ and Python are the primary languages for everything
@@lashlarue7924 because you cannot trace where certain variables and functions come from due to dynamic typing, because some errors, like a missing parameter, will surface only at runtime, because python developers like to write a messy unreadable code. In most companies C++ code conventions explicitly prohibit using obscure constructs and require the developer to write clear code which is easy to read. It looks like python developers are competing with each other to create the least readable code.
Then you shouldn't be working in C++. That's the problem at Google as well as other large companies, they employ a lot of people who don't have adequate expertise in C++ instead of hiring a much smaller number of those who have. I've been interviewing a lot of people for C++ positions, and US candidates were horrible, less than 1 in 10 were qualified despite their resumes showing they were working at various large companies on important projects. All the best candidates came primarily from Eastern Europe -- they love C++ and know language really well. The best team I ever hired was from Ukraine, four people who did the work of a hundred of average developers, and they wrote much better code at that.
I'm sorry this comment isn't directly related to the video but man I love these newer videos of you on camera. Your original NeetCode videos helped me a TON when I was learning DS&A, but hearing you talk about larger topics like this and putting a face to the voice is just too cool. Many of your talks like this have sparked curiosity around a topic and then I have to go on a deep dive to learn something new. Thank you for sharing so much!
If you intend on having a strict style guide for any programming language, enforced by code review, then you should have a linter that runs locally and automatically when you build and it should be double checked by an auto-build attached to the review itself. That way devs don't waste time locally, unless they're pushing stuff just to be casually and quickly seen.
the thing is that C++ is also suitable for those high level cases. You can use C++ in a safe way where you don’t have to manage all those things if you are not concerned about performance. Just use RAII and smart pointers for reference and you’re good to go
Maybe for a large company as google it makes sense and they already have services written in different lang. But for new startup js on backend completely makes sense
Some lang rules from the experience 1 learn lang at least 25 years old. 90% of coding today is done with the 30+ y.o. languages. 2 if you want to create a new lang you will probably fail, like so many newer langs (python being the exception for now). The world doesn't need a better lang but a better programmer 3 all (old) langs have pitfalls, but generally, all have a purpose Personally.. i do JS, love C, admire C++. The life is too short for C++
Most new languages are created by people who don't know really well the existing ones (D-language would be an exception). They are attracted by one particular idea and create the whole language around it. Then they find out that the world is lot more complex and either they start years of evolution to get the holes covered during which the language becomes less and less clean, or they decide to remain a niche perhaps supported by some religious following.
"The world doesn't need a better lang but a better programmer" is an incredibly stupid sentiment, if that was the case we would all be coding in Assembly and Fortran
Joke is there are handful number of people who actually knows C++. On the serious note the reason why C++ is so complicated are array of features it provides and when you mix them ur creativity is the only limit. It has multiple class Inheritance(which most modern lang stay away from it) and mind twisting template constructs which produces countless combinations.
As a C developer that frequently uses hash tables, I find this kind of funny. The standard library has no hash table implementation, but it doesn't need one because several dozen implementations already exist. Granted, they're all different and the standard committee is definitely never going to agree on how to implement such a thing with so many competing ideas, but there's nothing stopping anyone from just picking the one they like and using it. I've been using my own library for about two decades now, and if you've been at it for any length of time you should have one too. However, that said, I would fully expect anyone who's new to programming to not want to go through the effort and they'd be better off learning a programming language that does it for them.
@@samuraijosh1595 I have to find some space somewhere that I can upload it first. I refuse to use GH, but I may sign up with GL, though only because setting up a publicly visible server anonymously is next to impossible.
I'm encountering a similar issue at my workplace. C++ code can indeed become quite intricate, especially with meta-programming involved. It can be quite challenging to navigate through its complexities 😅😅
I can't tell you how relevant this rant is right now. I was pulling my hair out deciphering a backend service (recently!) written in C++, just to figure out that it wasn't doing anything more than simple CRUD functions 😢
I can see why Google doesn't want every microservice in the same solution be written in a different language. Sure, protobufs and all, but still - maintenance burden of 10 languages vs 1 or 2 is going to take a toll. Having said that, unless it's a mature product and has a large legacy codebase, there is no reason to choose C++ over, well, (almost) anything.
My C++ snake game is still the smoothest, most high performing, resilient and satisfying piece of code I’ve ever written, and C++ is the deepest rabbit hole of a language I’ve ever dug (JavaScript is slowly catching up though).
@@phillipanselmo8540 torrents ofc. about 50gibs of them. or you can check some their open source projects they spawned like clickhouse(not sure if it's ain't c) or userver
@@isodoubIet I wonder which one. Coz I grasped some Fuchsia code (utilities mainly), google tests and some others and they looked terrible on average. What actual gems are there from google?
I was hiring people for C++ positions in our company. The situation in US is terrible, people state they know C++, they showed resume working for large companies, but hardly one in ten candidates was qualified. I also had a pleasure of interviewing people from Ukraine (that was before the war), and they knew the language amazingly well, something like three out of four were hired.
If Google was using a Microsoft language "Typescript", why they're just use "C#" to replaced Java and C++. C# exists to fixed both Java and C++ mistakes. I feel like Java should have been more like C#
Because by the time C# became good enough (.Net Core and even earlier than that, the whole ecosystem) there was an enormous amount of code written in Java that matured earlier So why write code in a language that not as many devs in the team know, when you can just use Java
"C# exists to fixed both Java and C++ mistakes. " Actually no, it's literally just to fix Java's mistakes. C# in fact didn't even learn from C++'s successes (see for example IDisposable and try... finally)
@@isodoubIet You know Java existed to fixed C++ problems but Java created more problems from itself. Microsoft solution was, welp let just combined both C++ and Java into one language and let what we got 😏 . Bro, that's like saying React existed to fixed Angular problems. Angular existed to fix JS problems. Vue existed to fixed React problems. Microsoft: "let bring Typescript into the table"
@Bebtelovimab go inherited the := syntax, and the varname before vartype from pascal. In C you define the variable type before its name. And in go its the opposite(like in pascal)
lot of newer programmers are surprised to hear some things are ran rarely, and don't understand how anything but speed could be a factor. different languages have different strengths and uses
as an experienced java developer for a decade, the java sucks at compute heavy jobs, specially which have too much recursion, it'll block the GC & you really don't have any control over memory allocation and dealloc, you may likely see random JVM crashes because of OOM, for others C++ is overkill.
I love C++ as well, but holy shit there are so many frameworks that have all these macros and other elements that it makes it feel like each one is its own language.
@@nempk1817genuinely yeah. Its no Go or JS for stupidly simple syntax but its legitimately simpler syntax and semanticswise than java/c# and definitely moreso than c++. It’s somewhere between c# and c for language complexity. People only call it hard to use bc they cant be bothered to fix their bad programs
@@nempk1817The rust build system (cargo) is infinitely better than c++’s mess of different tools. You don’t have to learn scripting languages like CMake in order to get your stuff to compile or install dependencies.
I doubt this guy ever set fot in the google buiding - let alone got hired there. If THIS is representative of their level of "expertise" then they are FAR BEHIND the rest for the programming world.
So I've used C++ for going on 30 years now. I don't really understand why people say it's hard. I've not found it to be any more difficult than say other languages like python or rust. C++ has a ton of "features" that you don't necessarily need to use for most things.
You only said that after 30 years, no one would spend at least 5 years learning how to write production-grade C++ just to add some features to legacy code (which competitors are already advancing in) unless they have no friends
People are coming from high order languages like python, JS or Java where you have just int and suddenly they meet int, int32, int32_t, uint32_t, size_t and something like " typedef signed char int8_t;". I used to believe that IDE and compiler can auto suggest or select required type of int because at the end I am specifying to which platform I like to build code, but C++ still has very poor support in that area. But you can see it only if you have good knowledge of other modern languages.
as a dev for many years - (now strive to do all coding via llm) I used to think swift should run everywhere - apis etc. Never took off - tensorflow swift died. Is kotlin server side the future? to be seen. I'm doing api crud / logic controller code over last 12 months in python / aws lambda - and arguably - this should have be done with typescript or golang or java. I had free reign to implement however I chose - but it really came down to me wanting to further python skills in lieu of doing more machine learning stuff in subsequent projects. It is clean - succint. In similar way - perhaps the people doing c++ services - really want to do some coding in c++ so they can jump into other projects using c++. I guess attracting staff could be a factor. You want these great minds working for you - but they want to code in c++. The future of coding is prompt engineering - chatgpt is operating at 155 iq - so let it decide what to code in.
Not really a rant on C++ itself but more about a project using C++ while it should better use a different language. As a language, I agree C++ is a mess and hard to learn but I also think it's not going away anytime soon and there are always cases for using C++ even with the existence of new languages like Rust.
C is basically on life support (C17 only fixed defects in C11. Though C23 will add a few useful features). C++ is a living language that gets a bunch of features every three years. Bit hard to keep up at times. Sofar every new C++ version has been a significant improvement for me. Though with the right libraries C++17 isn't too bad.
@@philipbotha6718 a good language is a stable language. You don’t want new features all the time - although some features in C++ I do really like and are a great improvement. But that’s why people in the embedded world stick with C, because it’s a simple enough language to prove and test your systems is doing exactly as designed without having to dig deep in compiler specifics and side effects. Which is crucial for embedded critical systems. C ain’t going anywhere in the critical systems world.
Learning C++ at school vs learning C++ on the job are very different. The level of skill you need to do your homework assignment vs getting a project production ready are very different. If all the experience you have is school, you’re basically inexperienced 🤷♀️
Someday google will understand, that it's required to hire people familiar with language they will write. Someday... But now they write c++ with 'senior' developers, which not know how to fix simple error
kinda knew it'd be the case but a bit disheartened to hear that even google doesn't use golang for their stuff, been learning golang for about a month and I really like the language but feels like a waste of time if no one is using it :( might as well invest my time into learning Rust instead.. sigh
0:12 Javascript nonsense on the backend. I used to think that too but of late I have become more accepting ...in limited cases. It has its place such as for simple sites that need to be brought up qickly and where a 'heavy' language such as Java is an overkill. But it's not a good idea to build large complex/enterprise apps with javascript backend - for a host of reasons.
If you gonna write anything in C/C++ then you should use Golang instead. C language is a very important language to learn but not safe to use. It gives you that deep knowledge and understanding about programming that the other languages don't offer.
Maybe Google chose C++ as its standard because it wants to separate the people who love programming they would spend the time learning C++, or are computer science majors who are taught in C++, from the people who became devs only because they want the better pay but don't really have the talent for it? I don't know. But this choice of a language is definitely a decision made by a team who discussed this and settled for C++ instead of languages de jour like Rust or Java (which is kinda getting unpopular now.)
Google has been using C++ since the early 2000s at least, and Rust wasn't stable until 2015. Java isn't an option for some of the software they write using C++; for instance, Chrome needs to be in C++ primarily for performance reasons.
@@NeetCodeIO I use the term backend loosely haha. Not exactly server code but definitely not just code responsible for populating a web app, though it does run client side. Don't wanna out too much 🤣🤫
1:18, what a hell?! It even got ranges! WTF are you saying?! 1:31, this is everything. With that, any tool can be made, thus any problem can be solved in a convenient way. 6:00, despite C is the best part of C++, it's still kind dangerous alone. I write everything in C++, in fast pace, but I prefer to leave C in the past.
C++ is my language at home. Its horrible, I love it. I don't really like C. I understand why people like it. The simplicity. C++ affords me all the power C has, but also gives me more abstraction to work with. Java is fine. Pretty well organized and readable. I can see how Java people are able to think broadly. Its does conduct to this. I think maybe people are immediatists? Is productivity typing? With C++ I spend more time thinking than typing. With Java more time typing than thinking. Time to accomplish something: about the same. Java code reads like a well written contract. C++ reads like an obscure datasheet. That's one for Java. I wonder if it's worth learning JavaScript.
I'd write Odin Lang for ultra performance code. I'm not even good at it yet, but it's just as fast as c or cpp and much simpler. Like..many many times simpler.
C is about as simple as a programming language can be. if you're coming from a hardware point of view it all makes sense (pointers, memory etc) it's as if you had sonething like a piece of paper and some color at your disposal. nothing fancy. but it all makes sense the hard part is algortithms and data structures. C has no array, no hashmaps, linked lists, etc... iirc it has no mention of 'stack' in it's specification. (reason being to support old ass hardware that ran through mythic magic; to not limit the functioning of the language through the cpu's abilities) C can be very inconvenient or nasty at times. error handling, string operations, arrays, lists, hashmaps, type generic stuff (preprocessor/void*)... I think a better word for Odin would be convenient? Though I could be wrong, tell me what you think
It's easy to make a language simple when it doesn't do as much. Odin is not really a serious contender in any space where C++ is used because it has no answer to the memory management problem. Literally no answer.
I would say Mojo takes things even a step further. Simple syntax, but even deeper optimization opportunities with compile-time guarantees and access to IR.
I've always agreed with this take. Both are wildly successful, endlessly abstractable, and both are a complete pain in the ass, both I choose them over any other language.
I think C++ is one of the most horrible languages I have ever used (and I have to use it A LOT). Why: Because of all the reasons you mention. What I really don't understand: With what you explained, how are you able to LIKE C++??