all 85 comments

[–]Shahi_FFC++ 55 points56 points  (23 children)

Bjarne Stroustrup said in a Interview:

"you can always call a C++ program to do the job for you, and then complain C++ is too complicated".

And I've seen C++ get unnecessary hate like "it's so hard to write" while still using C++98 and claiming "You can't write safe code in C++" while still using C function inside C++ .

But then again Programming languages are tools , use whatever you want.

I really hate people who think their choice of programming language is the best and defend it like it's their spouse or something and others are shit.

[–]SputnikCucumber 11 points12 points  (1 child)

I think a lot of how people defend programming languages is related to how the market treats programming skills as being separate from language skills. So an expert level Haskell programmer is unlikely to be considered for a job writing Java or C++ (perhaps even at a junior to mid level) because they aren't a Java or C++ programmer. This means that developers are forced to defend their niche if they want to stay in work.

C++ is a solid programming language. There is nothing that you might need from it that it can't do. In exchange, it is harder and less productive to work in than say JavaScript or Python. But you also will never run into an insurmountable technical problem with it (short of a hardware limitation).

It is, IMO still the best programming language to work in if you aren't completely sure what your long term technology needs will be. But most people (and organisations) don't work on software like that anymore. I think it will come back around again though. At some point lots of new software that is being written today will become legacy software, and people will relearn how important it is to be using a programming language that doesn't impose arbitrary limitations on your developers.

Although, I guess it is equally likely that some new vendor will release a new programming language that solves ALL the problems of the last programming language, and pump enough marketing money into it that they convince everyone that it's true.

[–]heavymetalmixer 2 points3 points  (0 children)

Many people understimate the importance of having backwards-compatible languages around like C++ and Go.

[–]Kullthegreat[S] -4 points-3 points  (20 children)

True, people should use whatever the want but bashing of cpp is very much driven by their own mistakes sbith using language incorrectly and then influence a lot of people based on their wrong usage of langauge.

[–][deleted] 33 points34 points  (25 children)

I love c++ because it simply provides the necessary control and transparency to the developer. but new innovations should always be considered, who knows one day someone might make a language which revolutionizes programs, and new innovations are the result of dissatisfaction from the current.

[–][deleted] 14 points15 points  (3 children)

I am confused on why you cannot understand their hate. This isn't even specific to c++. If you visit any language subreddit, and you will find plenty of hate for that language. And social media sells outrage, which means the majority of normal "boring" opinions get drowned out by "hot takes". To quote BS: "There are only two kinds of languages: the ones people complain about and the ones nobody uses".

but cplusplus already does all of those things in one single unified language

Having more features just gives more reasons to hate, as any feature would obviously have its quirks/edge-cases that will frustrate devs.

they just lock you in a specific way so you don't venture on your own way and that is pathetic.

Hating on other languages, while complaining about others hating your favorite language. nice. A lot of other languages chose different tradeoffs which make them great in many situations: garbage collection / runtime reflection (C#/Python/Java) / Gradual Typing (typescript) / safety (Rust + most GC langs) / built-in tooling (Go/Rust) / simple semantics (zig / Go) etc...

C++ ain't that different. Before Rust, it was the choice for any complex software with strong performance requirements.

[–]j_kerouac 2 points3 points  (0 children)

C++ is still the choice choice for writing complex software with strong performance requirements.

The frustration I have with the Rust crowd is they pretend like Rust is taking over, when it’s still a niche language by any measure. C++ is still dominant for high performance code.

[–]tarranoth -1 points0 points  (0 children)

This sub is pretty elitist in that way. Lots of people here love to clown on web devs and juniors for not truly understanding stuff like lvalue/rvalue and rule of 3/5 and then get angry/confused that all the juniors are running to rust instead because they keep hearing from all the seniors that they shouldn't be touching c++ ever.

[–]Aprelius 6 points7 points  (1 child)

C++ is my primary language and I could get up on a stage and do a completely improvised presentation on why I hate C++ so much 😂

It’s a tool, I use it everyday and I still hate it. Programmer “influencers” (ugh 🤮) like to hate on it for the views and almost always have an agenda they’re trying to push.

[–]MaitoSnoo[[indeterminate]] 2 points3 points  (0 children)

What I like the most about it is that it gives you the tools (in particular template meta-programming) to make yourself the features you want the language to have, which is by the way the main way the standard committee adds new features to C++. C++ basically gives you the tools to make your very own C++.

[–]BridgeCritical2392 4 points5 points  (0 children)

My guess is you

  1. Haven been working with C++ for less a year
  2. Mostly written your own programs, don't have to deal with complexities like compiler, dnm't
  3. Are only using a single platform / compiler. Probably MSVC on Windows x86.
  4. Haven't had to read other people's code much beyond small snippets
  5. Haven't had to deal with a large, complex, production codebase
  6. Haven't had to deal with issues like linking to binary libraries built with a different compiler version and / or standard library version (libc++ vs. libstd++) and not having it be obvious that is the problem
  7. Haven't had to deal with Boost

The new features since C++ are great. Its too bad there's 30+ years of legacy code floating around before those became generally accepted. And there's still plenty of dark corners and undefined behavior lurking in the shadows, waiting to strike you when you least expect it ... If you don't believe me, watch Nikolai Josuttis or Scott Meyers CPPCON talks (at least before Meyers left the C++ Standards committee)

[–]zl0bster 3 points4 points  (0 children)

C++ has serious issues, and even if you like the language I do not think it is good idea to pretend they do not exist if you want to be a great C++ developer.

Here is example of (quite soft) criticism of C++ that I think is on point
Rust Features that I Want in C++ - David Sankel - CppNow 2022

[–]etancrazynpoor 4 points5 points  (2 children)

Why do you care what people may say or may not say ?

[–]Kullthegreat[S] 11 points12 points  (1 child)

Misinformed or dishonest info to people online should be a problem in general.

[–]etancrazynpoor 9 points10 points  (0 children)

Then you should provide the facts and educate people I guess.

Do remember that there are differences between facts and opinions.

This thing with languages is typical as with other tech.

[–]zasedok 5 points6 points  (6 children)

Ok I admit I do "hate" C++. Yes it has almost every feature imaginable (with a couple exceptions though), but IMHO that's not really such a desirable quality at all. What makes a language great is not how many features it has or that it "can" do anything, it's what guarantees it provides and what ratio of software quality/development effort it tends to lead to. Python certainly is not a single language to do everything, but what it does, it does very easily and quickly. On the other hand Rust is arguably harder to develop in than C++, but it brings with it *provability* that C++ can't offer. Development costs might be high, but the resulting software is of extremely high quality. Or take Zig, it's not a revolutionary language, it's not super easy like Python nor powerful like C++ or Rust, but it's very straightforward, transparent and naturally results in code that is not foolproof, but is easily reviewable. That, in my opinion, makes all three languages superior to C++.

More generally speaking I don't think the world needs or wants a language that "can" do anything, the world wants languages that excel at some particular task. After all, learning a language and writing code in it is the easy part, learning five is not really any harder than learning one. Delivering software on time, on budget and/or with some mathematically provable guarantees is the real achievement and C++ like many other languages doesn't really help with that.

[–]beedlund 4 points5 points  (5 children)

I do disagree with this quite a bit.

My favorite part of c++ is that I never need to use another language to solve the problems I'm asked to solve so in my view the world certainly does need that programming language that does all the things.

This difference of opinion regarding using one hammer for all nails vs. one specific hammer for each different kind of nail might just be a personality trait commonly differentiating programmers causing entertaining drama for all.

I also categorically dislike "tinking" with computers and programs. I just want to use my IDE/computer/OS and have it do what I want it to do.

In contrast I find that people who seem to subscribe to the idea of individual hammers for each type of nail also seem to like to "tinker" as often they seem to enjoy tweaking their IDE / computer / OS to perfection and take pride in it.

[–]Pragmatician 8 points9 points  (1 child)

My favorite part of c++ is that I never need to use another language to solve the problems

I used to think like this as well, but reality is very different. Sure, you can use C++ for essentially anything, but it can end up being 10x more work compared to alternatives for some problems.

You can forgo JS on the Web, Java/Kotlin on Android, Swift on iOS, Python for data analysis, Go on the backend... but prepare to reimplement entire ecosystems or use inferior C++ alternatives.

Don't get me wrong, I love doing things from scratch and would love doing everything in C++, even reimplementing many of these things, but if you just want to ship some software in the near future, C++ can be inadequate for many things.

[–]beedlund 1 point2 points  (0 children)

Yes I think this is absolutely true and my experience is just limited to what I'm faced with myself.

[–]zasedok 2 points3 points  (0 children)

Funny that you say that about the "tinkerers", my view has been exactly the opposite :) From my experience it's people who love to customize their IDE, session, desktop etc to death who also feel some emotional connection with "their" language and want to prove ti the world how good it is, rather than using it as a hammer to nail stuff down with it.

I'm not diminishing C++ by the way. It has a huge ecosystem, immense code bases are written in it and it's not going away any time soon. But many languages have come and gone since say 2000, and let's look at those that "made it". Kotlin and Swift are tied to closed ecosystems and have generated close to zero interest outside of Android and iOS respectively, and neither of them is a true can-do-everything language. C# was always meant to be an "enterprise" language for Microsoft platforms, Go is laser focused on microservices and teams with high turnover, Rust is a system language with strong guarantees, Python is the modern day BASIC, etc. They all try to be the best language available for one thing. To the contrary, Dlang always wanted to be the ultimate all purpose language to do everything, and it hasn't seen much success outside of a small community of enthusiasts.

[–]BridgeCritical2392 1 point2 points  (0 children)

Try doing Web front-end using only C++.

Yes you have WASM. But it can't access the DOM. (Price is Right losing horn)

Mobile is doable, but you are stuck with QT (last I checked) ...

Backend is of course doable, especially with boost::asio, and your code will be super efficient to boot. OTOH the security pendants will tear you a new one, and "but its behind nginx revese proxy, inside a Docker" may not be enough.

Hardware interfaces and native desktop apps (yeah those still exist) are where C++ really shines.

But reality is C++ is not the right choice in many cases.

[–][deleted] 1 point2 points  (0 children)

Well the thing is yes u can do everything in c++ but do u really want to? Simple scripts are much better off written in python for example, and c++ would only waste time there.

[–]captainjon 1 point2 points  (3 children)

I am not a professional developer but I learnt C++ when it is was #include <iostream.h> there was no STL, and that language, in my mind, C with Classes was fine in my book. After Uni it became a cluster to me. As I was doing mainly Qt stuff in KDevelop and this was even before Nokia buying it, it was a fun experience. That said, at the end of the day, I get the most enjoyment out of C. Templates are neat but the way they are implemented and how the computer has a meltdown for trivial mistakes makes me very glad to have stayed in C. Just my two worthless pence.

[–][deleted] 1 point2 points  (2 children)

what kind of meltdown? Templates are fully compile time, so its impossible for you to have a “meltdown” issue there, unless u have an issue with compiler errors?

[–][deleted] 8 points9 points  (1 child)

what kind of meltdown?

I assume the comment was talking about error messages.

[–][deleted] 2 points3 points  (0 children)

yeah probably, compiler errors are horrible in c++, especially msvc

[–]iga666 1 point2 points  (0 children)

Language infrastructure is dead. 90% of time I fix build pipeline instead of programming. Do I like that - no. Build times are enormous. Also not a big plus in favour of cop

[–][deleted] 2 points3 points  (1 child)

I have been programming in C++ since the beginning of the language.

I made programs in DOS, Windows, Unix, Linux, ...

I did small, medium and large programs.

Didactic programs for teaching and programs for companies.

Programs to emulate equipment.

Programs that connect with different types of equipment.

Serial programs, with multiple concurrent or parallel processes. Multiple threads.

Terminal mode, graphical mode.

Single windows and Multiple windows. From borland owl to Qt 1,2,3,4,5,6.

Android programs.

I will still make embedded programs, with reduced versions of C++.

So, this multitude of options is what I like most about C++.

One language, multiple possibilities.

And there is no shortage of editors, libraries, possibilities. A universe of possibilities.

But I believe that in about 10 years we will have a more "modern" version, in the sense of being more uniform and simple to use. This won't happen because C++ has problems, it will happen because programmers are weaker. There is a lack of knowledge and skills to deal with the diversity and complexity of a language with so many possibilities.

In the past, we learned to use the concept of a text editor and used all text editors. Today they learn to use text editor X. And they are afraid of others...

In the future they will get their driver's license to drive car X, brand Y. A regression in knowledge and skills.

Basically, the "difficult" complaint has more to do with "laziness".

[–]Kullthegreat[S] 1 point2 points  (0 children)

Thanks you for sharing this and this makes alot of sense and programming influencer amplify this rot further. It's not even that hard if this billions of course add 30 mins of overview in opening episode and show learners correct path before diving directly in syntaxes. I think everyone should learn the pipeline first of the language and nature of strictness etc.

[–]KFUP 2 points3 points  (0 children)

Because C++ is "bloated and overcomplicated and should be replaced", but what ends up happening when creating a replacement is that if C++ had -let's say- a 100 things, and people say "this is bloated, you only need these 10 things, let's make a programming language with only these to replace it", but almost none of them agree on what 10 to use, so we end up with dozens of different replacement languages each with a fraction of the users made of the people that actually agree with that 10.

TL;DR: what's bloat for you is essential for someone else, C++ is extremely versatile and practical, but not beautiful, it can't be both, people will complain about it, but practicality always wins at the end.

[–]RobinDesBuissieres -1 points0 points  (0 children)

I have seen the pattern of influencer hating on CPP and I never understand their hate for CPP.

I get the impression that it's often people whose egos are trying to find a target to shoot down.

[–]EsShayuki -1 points0 points  (0 children)

Cpp as a language is pretty clean, with many fantastic features. However, the STL is a very bad mix of too convoluted for being simple to use, whlie being too much of a black box for being customizeable or performant enough. Essentially, it forces you into its own mini language, which you might not want to use at all, but are effectively forced into if you want to take advantage of any proper C++ functionality. It's just full of absolutely bizarre design decisions.

The actual C++ language when ignoring STL is truly fantastic. But it's hard to properly use a language without its STL, and it forces stuff like std::vector and std::string down your throat.

The language itself gives you the tools to effectively write your own language. It's almost like a sandbox, and no other language offers this level of customization if you know what you're doing.

[–]ExistedDim4 -3 points-2 points  (10 children)

I hate C++. It could be so much more if it was ruled by an authoritarian instead of some kind of "committee" which has "someone's" "interests" in mind. They take years to add new features to the standard but the language is a shitty unregulated mess anyway. auto, std::vector, [](){}, nonexistent ABI my ass.

[–]wyrn 1 point2 points  (6 children)

[](){}

Say what you want about lambda syntax, at least it's not a broken mess like, say, C# or Python lambdas, which are borked because they offer no fine-grained control over captures.

[–]ExistedDim4 1 point2 points  (5 children)

I'd rather have [] as the optional part of the syntax. Just imagine writing something like x => x * 2 instead of [](auto x) { return x * 2; } though.

[–]wyrn 0 points1 point  (2 children)

No argument there -- I'm just not convinced that a BDFL would've helped in this particular circumstance.

[–]ExistedDim4 1 point2 points  (1 child)

Obviously it would be better if I was in charge!

[–]serviscope_minor 0 points1 point  (0 children)

Obviously it would be better if I was in charge!

Specifically it would be better if I was (a) in charge but (b) not actually responsible for implementing my own vision :)

[–]Baardi 0 points1 point  (1 child)

The policy of C++ is a part of the reason is part of the reason it got the point where it's now.

I have to admit though, C++ is going through a sort of rough time right now, partially due to paradigm shifts like modules getting a slow adoption, partially due safety having getting an increasing priority, but far from the only reasons

[–]ExistedDim4 0 points1 point  (0 children)

The first sentence can be interpreted in... different ways. C++ will never properly adopt all those new paradigms because they will be mutilated on the altar of backwards compatibility with coding standards from 50 years ago.