77 comments

  • nacozarina 6 days ago

    C++ is so bloated that every project must outlaw multiple parts of it from being used on their project. Using the whole language is an explicit antipattern.

    Every project must colonize a valley of the language, declare a dialect, and bit-fiddle their own thing.

    It might be a measure of popularity, but not of unity.

    • estimator7292 6 days ago

      That's how all programming languages work. Have you used 100% of the features in any language you've used? Ever?

      • Bridged7756 6 days ago

        It's not the same though. The breadth is wildly different. In the case of things like JavaScript, C, or Go it can be said that you use -most of it- in a day to day to basis, sure, not the most magic, deep crap, but not the same can be said about C#, Rust, C++ etc on which you have a lot of features simply not used.

        • pornel 6 days ago

          Rust hasn't grown 17 ways to initialize a variable yet. Most projects use most features.

          When projects choose a subset of language features, it's dictated by their needs (like embedded programs disabling the standard library, or safety-critical libraries forbidding "unsafe" code out of caution). There are some people who vocally hate async, but their complaint is usually that everyone uses async even where it's unnecessary (meaning that it actually has very broad adoption).

          This feels very different than having an unwanted C subset, some '98 features that were replaced in '11 and '13, with fixes for them in '20 and '26 and then projects taking years to settle on a new baseline, and still bickering whether exceptions may be allowed or not.

          Rust has "editions" that let new projects disable old misfeatures (which it hasn't got many yet). Rust ecosystem is fully on board with the latest version.

      • smeeagain2 6 days ago

        Hell, look at Rust. Try bootstrapping that POS with verbose logging enabled, and watch the screenfuls of command line options scrolling by for every source file in the giant multi hour compile. It's got 30 years of cruft packed into a "new" language. Just think of how ridiculously complex it would become after an actual 30 years of real world use. That's the garbage you want me to replace C or C++ with? LOL

        C++ sucks, but I'll take it over Rust any day.

        • pornel 6 days ago

          Bootstrapping of the rustc compiler from scratch is a very different experience than using the language as a user. Bootstrapping requires building a C++ mrustc proto-compiler, which is where the tons of flags are needed. The rustc compiler has a custom multi-stage build system to make it and its standard library built with itself, which multiplies the time it takes. It's designed to be consistent and optimized, since most users download a pre-built binary.

          However, once you bootstrap it (or willing to trust someone who did), it's a breeze to build Rust projects with Cargo: `cargo build` just works with no extra flags for the majority of projects. The only finicky builds are ones that rely on C or C++ deps.

          • smeeagain2 6 days ago

            [flagged]

            • free_bip 5 days ago

              Calling your users idiots is not a good look for a maintainer. I don't know offhand what distro you maintain but I sincerely hope I never have to deal with someone this hostile.

              • smeeagain2 2 days ago

                It's my distro. I built it for me, not you. You can use the shitware that everyone else is using; this one is mine. Any and all opinions you may hold about my "attitude" here or elsewhere are completely irrelevant.

            • sheepscreek 6 days ago

              > I'm the guy who sees all the underlying ugliness that the idiot user ignores and pretends doesn't What’s with all the hate against the end users?

              “idiot end user”?

              Why sign up to be a maintainer when you think so highly of the end user.

              • smeeagain2 6 days ago

                [flagged]

                • sheepscreek 5 days ago

                  Why not use Gentoo?

                  • smeeagain2 2 days ago

                    Why not swim in a lagoon of toxic waste?

                    edit: Looks like some douchebag went through and laboriously flagged half a dozen completely innocuous comments of mine. What a surprise. Don't let anyone say Hacker News doesn't have a censorship squad on par with the best.

            • pornel 6 days ago

              You're harshly judging the entire language based on ease of compiling a 3rd party C++ compiler and the C11 code it emits. These gnarly build commands don't even come from the Rust project, and aren't using the Rust language.

              (I assume you use mrustc, and you're not going the masochist route of recreating all the development steps starting from a 15-year-old Ocaml-based prototype of a language that wasn't Rust yet).

              It's fair to say that bootstrapping of Rust sucks. It really does. The non-Rust bootstrap compiler doesn't get even a fraction of the polish that rustc and Cargo get. But it's not representative of how Rust and Cargo work for basically everyone in the world except you (and a couple of other maintainers who chose to do an independent bootstrap from scratch). Bootstrapping is a one-off pain, and then building Rust with a Rust-based compiler is nice and easy.

              It'd be nice to have a cleaner bootstrap story for Rust, but it will take a while (waiting for gccrs C++ reimplementation to advance enough to replace mrustc).

              • smeeagain2 6 days ago

                [flagged]

                • pornel 5 days ago

                  There is a cranelift backend written in Rust.

                  Rust is pragmatic about its implementation. The goal isn't some ideological purity (despite the reputation Rust has), but to empower users to make safe and efficient systems software. LLVM works well for that, so replacing it isn't a priority. The cranelift backend exists to make debug builds faster.

                  • smeeagain2 2 days ago

                    When your "cranelift backend" is every bit as powerful as LLVM, get back to me on how Rust is the replacement for C++. You'll still be wrong, but at least you'll have some kind of foundation to stand on at that point.

        • ahartmetz 6 days ago

          Yeah, no. That is not a fair description of Rust. It's got far fewer mistakes than C++ and, get this, it has a mechanism for tentative features that can get revised and fixed based on usage experience. It doesn't always work especially for far-reaching decisions (I hear that async is considered problematic), but it prevents a lot of stupid mistakes that C++ is carrying along forever - with a few exceptions (e.g. garbage collection support, extern templates) and some very notable inclusions (the kind of botched module system, suboptimal unordered_map, std::string which is more of a byte/word array).

          I like C++ because I like the fairly unique high performance low level feature set, not because I particularly like most of the detailed design decisions that went into it. Rust has the same goals, but is better thought out IMO. I'm sure that I will find some more trouble in Rust as I use it more, but so far the impression is quite good. I have become pretty good at writing C++ code that works after fixing one or two stupid bugs, and that works even better in Rust, mostly without the stupid bugs because you can't forget to null-check a pointer to another subsystem while starting up etc.

          • ahartmetz 4 days ago

            * should have been: high level, high performance feature set

            I also call C++ a high level low level language.

          • smeeagain2 6 days ago

            [flagged]

            • vacuity 6 days ago

              You're naming and lambasting multiple different technologies and their communities without justifying why they are so bad. Few people use C without knowing about the threat of buffer overflows or invalid pointer dereferences, and C can be used productively in spite of these obvious flaws. Instead of trying to drive people away from what they do, if you seek understanding then you should allow others to justify their reasons. If you only test your understanding against your understanding, you're not making an assessment at all. You can find and talk to many smart people here and elsewhere, if you so desire.

              • smeeagain2 6 days ago

                > You can find and talk to many smart people here and elsewhere, if you so desire.

                Yeah, and you find can smart people on Reddit too. Problem is the low density of intellect in both places.

            • spoiler 6 days ago

              You're saying "force into this and that" like there's some evil omnipotent entity compelling people to write Rust against their own free will lol. What do you mean by forced? People enjoy writing Rust, so hence it's being written in other projects.

              Saying LLVM is written in C++ doesn't really bring much to the discussion. It was released 25 years ago, and C++ was released 40 years ago (hey, it's older than me lol). Rust was released like 10 years ago. So, yeah... I guess it makes sense that they used C++ back then? I'd have picked C++ back then too.

              I've written C++ for about 15 years, and I don't have a blind hatred for the languge, but going back to it doesn't fill me with joy either, especially after having written Rust for the past few years.

              The module system is more intuitive to use than the preprocessing file concatenation. There's also a nice package manager. I know some people find this a downside though, but I prefer it to fighting autoconf or CMake.

              Syntax highlighting for Rust code doesn't lag 10+ seconds.

              Symbol search doesn't require three different third-party tools to work.

              Documentation is built in AND nice (no doxy doesn't count as nice, not in any universe).

              Testing is built in. There's a (mostly) homogeneous build system

              The borrowing rules are things you think about in C++ anyway, but Rust just makes it so you don't forget them; there's some clang lints that help with this in C++ anyway.

              The syntax, while sometimes a bit noisy, is nicer in the average case, but C++ has been getting better in that regard.

              There's much fewer API gotchas with Rust than with C++ (from the top of my head: closures, std::optional, std::variant, iterators, {a..z}values, a managerie of constructors, SFINAE, all these things have pain in the ass built in as a core principle). I also despise function overloading.

              The macro system, while I don't like it too much in Rust, makes things

              The type system in Rust is so much better it's not even comparable.

              But anyway, Rust has some downsides. It requires you to change how you design solution sometimes. The compilation times are crap (but the compilers also does so much).

              • smeeagain2 6 days ago

                [flagged]

                • ReflectedImage 6 days ago

                  The military isn't going to allow C++ anymore due to it being a massive security hazard. You can't get away with buffer overflows, use after frees, data races, etc. forever.

                  Due to an evil entity called the military industrial complex, you are going to be using Rust in the future.

      • mrheosuper 6 days ago

        not close to 100%, but i think i can say i ultilize most of feature of C, must more than C++.

      • pyuser583 6 days ago

        As a Python dev, I really hate the whole “Pythonic” idea. There isn’t just one way to do this.

    • psyclobe 6 days ago

      Honestly... who cares? The dictionary is pretty thick, but I still speak English without much trouble.

    • nitwit005 6 days ago

      Open up an old Java code base, and your IDE will tell you to refactoring tons of code, as it was written in an old way it thinks you shouldn't use anymore, uses deprecated classes, etc.

      Javascript is even more dramatic, where it will tell you to fix every single variable declaration, as people decided "var" was a mistake, and there is a whole new way of defining classes.

      • spoiler 6 days ago

        Var wasn't "a mistake", and there's still (albeit niche) use cases where var makes sense. But for most cases, you do want to write a let/const declaration, even though they're not "free" technically.

    • sidewndr46 6 days ago

      I normally disagree with such broad remarks, but in the case of C++ I agree. I sometimes see a less common feature of Python used and have to remind myself of the syntax and its usage. With C++, I start any project with the idea that I will only use a small subset of the available features. When I review other's code I pretty much need a language reference available at all times until I can settle into their particular flavor of C++

    • emigre 6 days ago

      I wonder if a subset of the language could be formalized, as some kind of opt-in decision. Like when TSR divided Dungeons & Dragons into D&D and AD&D...

    • jcelerier 5 days ago

      > Every project must colonize a valley of the language, declare a dialect, and bit-fiddle their own thing.

      this is really not true in my experience. I don't remember last time I worked a project which outright banned specific C++ features or had a "dialect".

    • steve1977 6 days ago

      > It might be a measure of popularity, but not of unity.

      Neither of which are great measures probably. What about usefulness?

    • i_am_a_peasant 6 days ago

      to this day i don’t know what people mean by “features”.

      Lambdas are nice to have, just don’t nest them more than once.

      I kinda wish things like std::variant had shorter syntax.

      if anything i’m not a fan of c++ introducing language features as long verbose functions than to confidently make it an operator or a keyword.

  • rzerowan 6 days ago

    Yeah C++ isnt going away anytime soon - its not even in the COBOL phase of its lifetime despite the rise of Rust/Go as systems languages.

    However it would be imperative for a push such as Carbon[1] to be similar to the kotlin to Java. A modernisation that simplifies , maintains backwards/forwards compatibility and reuses established libraries and tooling.

    This however will need a entity that can champion and push it forward with a strong enough project to anchor it in the mainstream.The transitions are doable ,like Android dev from plain java to kotlin , or in OSX moving from Objective-C to Swift.

    Additionally borrowing a robust batteries type standard library to reduce the sprawl of coding options and funnel greenfield projects into best practices and less boilerplate.

    [1] https://www.infoworld.com/article/2337225/beyond-c-the-promi...

    • smw 5 days ago

      I think most people wouldn't call Go a systems language? Generally garbage collection lack of explicit memory access would put a language outside the category? Hard to write a device driver, for instance.

      • rzerowan 5 days ago

        True although there is Ocaml which has been used in OS/driver/Hypervisor development while also having a GC. I always thought the Go equivalents would have perfomance at parity - but never reallyseen that realised so far.

  • 12_throw_away 6 days ago

    Well, if the chair of the C++ standards committee truly believes that C++ has no serious safety issues, it certainly explains why safety proposals have gone nowhere and "profiles" remain vaporware.

  • norir 6 days ago

    This is weirdly confident and defensive at the same time. If c++ is so great, why does it need to be so ardently defended and its very obvious problems handwaved away?

    I take a very different view about the trajectory of languages given the current trends in software development. The more people rely upon agentic coding processes, the more they will demand faster compilation which will increasingly become a significant bottleneck on product velocity. The faster the llms get, the more important it is for the tools they use to be fast. Right now, I still think we are in an uncanny valley where llms are still slow enough that slow tooling does not seem that bad, but this is likely to change. People will no longer be satisfied asking their agent to make a change and come back in a minute or an hour. They will expect the result nearly instantaneously. C++ (and rust) compile times are too slow for the agent to iterate in the human reaction window so I believe that one of two things will happen over the next few years: llm progress will stall out or c++ and rust will nosedive in popularity.

    • hu3 6 days ago

      If [language] is so great, why does it need to be so ardently defended and its very obvious problems handwaved away?

      Every language popular enough is like that.

  • raccoonhands 6 days ago

    i personally enjoy it because i just think it's a blast to write and typically understandable and explicit in its language.

    with the caveat that i know it could be better. at this point i just think it's simpler than some of the stuff out there from a 'whats happening underneath the hood' perspective

  • IshKebab 6 days ago

    > in the past three years the global developer population grew about 50%, from just over 31 million to just over 47 million

    That's not really plausible. Unfortunately this is all you get on the methodology:

    > Our methodology is based on two main pillars. First, we make use of reliable sources of developer numbers or direct indicators of their activity. This includes the number of GitHub accounts, Stack Overflow accounts, and employment statistics from the USA and the European Union. Second, we rely on our Global Developer Survey data, where we directly measure developer activity. So far, we've run 29 waves of this large survey, and in each, we reach more than 10,000 developers globally. We combine these two main sources to derive our estimates.

    Plenty of space for them to screw up I think.

  • ramon156 6 days ago

    All the following statements can live without colliding.

    - The current CPP version is extremely bloated

    - CPP is not going away anytime soon

    - The rise of Rust/Go/Zig is not fighting for CPP's seat

    - You can target CPP code using any of these aforementioned languages

    - Rust has never claimed to be "safer", it just makes it harder to write unsafe code

    • IshKebab 6 days ago

      > Rust/Go/Zig are not fighting for C++'s seat

      Of course they are. Go less so, and Zig is really aiming for C. Rust is definitely meant to be a better alternative to C++.

      > Rust has never claimed to be "safer"...

      What? Of course it has (or Rust developers have; a language can't claim anything). And it is much safer.

  • helltone 6 days ago

    Is there anything like a linter to force you to stay within some subset of c++? I like the language, but it is hard to avoid language constructs that are outdated or enforce a single (or a few) ways of doing things. A c++ subset could be nice.

  • paperplaneflyr 7 days ago

    So C, C++, and Rust programmers will be in demand, and other languages will shrink? Does this also relate to rising DRAM costs, which will make memory-efficient code more usable as we head into an unseen future?

    • estimator7292 6 days ago

      The costs of hardware will take a long time to percolate up to software architecture, if they ever do.

      Until current computers cycle out, people will largely keep their 1-3 year old machine with sane amounts of memory. If we start seeing large numbers of machines in the wild with 4GB of memory, then maybe software will adapt. But that won't be for several years yet.

    • RadiozRadioz 6 days ago

      It definitely doesn't relate, the time horizon is wrong. The software needs much longer to change, and that change needs much longer to appear in the job market. Compared to the timeframe in the article DRAM prices have only just spiked up now.

      Projecting into the future, hardware expenses have always been dwarfed by salaries. I don't expect that will change enough for it to be noticeable.

  • pornel 6 days ago

    Growth of CUDA gave it a second chance.

    • deeznuttynutz 6 days ago

      I guess TPUs and JAX give it a third chance, and maybe MLX a fourth, lmao.

  • singularity2001 6 days ago

    A subset of the language keeps getting better and better you just need to ignore the demon of many decades of bloated nonsense. So for new projects it can even be pleasant until you run into something that makes you wanna go rust

    • smeeagain2 6 days ago

      I like my OS how I like my cars: rust free.

      • ReflectedImage 6 days ago

        Have you heard of Microsoft's C++ elimination plan? They are building an LLM based transpiler that automatically turns all C++ code into Rust. In a couple of years, there won't be a single line of C++ left... Isn't that wonderful?

        • PaulCarrack 5 days ago

          Just to be clear -- It's an aspirational research project, much like (Galen's) Azure Sphere from 8 or so years ago. This is NOT Microsoft's official stance.

          Galen is a super smart guy, but he's not a decision maker. I have yet to hear that this is actually the official direction Microsoft as a whole is taking, across any of their business segments.

        • smeeagain2 6 days ago

          Yes, and I'm sure they and all their customers will live happily ever after. Finally Microsoft will have reliable software that isn't complete trash. Pigs will fly also, I believe.

          • ReflectedImage 6 days ago

            Yep, not a single line left. Retired quicker than COBOL. Won't even be any maintenance jobs for legacy systems left.

            • smeeagain2 6 days ago

              So are they going to magically convert all the COBOL code over also, with their magic conversion system thingy?

              I'm sure this conversation is headed in an academically fascinating direction, but I struggle to see what relevance any of it has to me. I don't use any of Microsoft's worthless software and never will. I'm self employed and use exactly the technology that I choose to use and nothing more. Why on earth would I be concerned about legacy programming jobs going away? Is that something that you concern yourself with?

              I'm guessing you're a common wage slave? Tell me more about what it's like having your entire life planned and controlled by other people, with no hope of any kind of real freedom. Sounds like a miserable way to live. Sounds like slavery.

              • ReflectedImage 5 days ago

                Well I don't think anyone would pay for the COBOL to Java conversion software.

                Since it's no longer New Years Eve, I'm a bit more sober :p

                Programming language to programming language conversions seems to be one of the things LLMs are actually good at. Whether they can actually do it or not is an open question.

                CEOs will mandate security so the CSOs will mandate Rust over C/C++ and so Rust will slowly take over C++ in next 20 years. Can't see anything in C++'s defense other than it's legacy. The drawback of sticking every feature from every language into your language is that it becomes a massive security hazard.

                huh? I'm currently at $1500 Monthly Recurring Revenue, so I'm currently between seeing if I can increase that or if need to get a job. I'll find out in a couple of months.

                • smeeagain2 5 days ago

                  > CEOs will mandate security so the CSOs will mandate Rust over C/C++ and so Rust will slowly take over C++ in next 20 years. Can't see anything in C++'s defense other than it's legacy. The drawback of sticking every feature from every language into your language is that it becomes a massive security hazard.

                  Yes, all this is true, but there's a giant invisible elephant in the room that will disrupt this plan:

                  With my language I can import every line of C/C++, from the entire system, then refactor it all with the click of a button. Someone in another thread mentioned how terrible strcpy() is. Why not just remove that function from the entire system and refactor every package using it, with a single command, instantly?

                  Rust can't do anything like this, nor can any other systems programming languages that we know of. That's one of several reasons why Rust isn't really a replacement for C/C++, regardless of who is writing what script for which politician/CEO. It is at best a tiny incremental improvement, not a revolution.

                  Happy New Year. May your business be a success despite the hurricane-strength headwinds we now face.

      • vovavili 6 days ago

        I guess you'll be stuck using something like Plan 9 then.

        • smeeagain2 6 days ago

          [flagged]

          • vovavili 6 days ago

            That is an extremely condescending, rude and arrogant response for a harmless comment. HN deserves better.

            • einsteinx2 5 days ago

              This describes basically all their comments in this thread, which seems to be basically all their comments ever on this 3 day old seemingly troll account.

            • spoiler 6 days ago

              I found their comment hilarious... I can't tell if it's satire or not. There's just too much going on at the same time for this not to be trolling lol

            • smeeagain2 6 days ago

              [flagged]

            • smeeagain2 5 days ago

              [flagged]

  • jokoon 6 days ago

    I am french, good C++ scores on senior tests, still out of a job

    I lack a degree though

    • BoingBoomTschak 6 days ago

      Same city as you, same language. There's work but not much if you don't want to enter the consulting meat grinder.

      • jokoon 5 days ago

        I am willing to enter the consulting meat grinder, if you have any tip

        I get regularly contacted my them, but they don't hire me

        • BoingBoomTschak 4 days ago

          Don't think I can give tips of value, as I'm "still young" and hold a pretty good diploma, so our positions are quite different. But my impression is that having a good enough portfolio (i.e. a meatier and more active GH) is a must if you lack the precious piece of paper.

  • 6 days ago
    [deleted]