12 ms·
> C++ is becoming a legacy language and finding contributors in the future will become difficult, This is wild to see written down. Am I alone in feeling like
by tayo42 4y ago
> C++ is becoming a legacy language and finding contributors in the future will become difficult,
This is wild to see written down. Am I alone in feeling like there is a huge disconnect between what people online say and what happens I guess in the real world?
Developers I actually talk to never seem to have these kinds of opinions about c++ and alot more reserved about using rust
- steveklabnik 4y agoYou can see both sentiments, for and against this idea, play out in this very thread. Lots agree with that post, some agree with you. Time will tell.
- tayo42 4y agoI didn't share an opinion on rust or cpp, just a comment on the difference that I experience between people I have conversations with and the opinion of vocal internet people. Only like 1% of people actually write on the internet. The everyone's doing it argument seems to me, more like a vocal minority.
- tialaramex 4y ago> Only like 1% of people actually write on the internet. The everyone's doing it argument seems to me, more like a vocal minority. Both the US Federal Government and the EU are apparently in the "vocal minority" who think programmers should stop using C++ because it's unsafe. Both have created documents which more or less just outright say that over the past year or so. As a result, two other very significant things have happened which might reasonably cause people to decide that for C++ this is perhaps the beginning of the end rather than just an interesting bump in the road. 1. Several people or groups announced "successor languages" in 2022. Unlike Rust, these aren't merely languages which are sometimes cited as potential safer alternatives to C++ or as languages you might choose instead, yet have an existence all their own - The successor languages are specifically targeting C++ and C++ programmers. In this number we can count Carbon, Val, Circle and Cpp2 / CppFront. 2. Several WG21 ("The C++ Standards Committee") members wrote papers for WG21 either claiming that there's no problem (this is not, in fact, a thing you do when there's no problem, nobody writes US policy papers saying the US is not at risk of attack by Belgium) or offering vague plans for plans to do something about the problem. These are hastily written (Bjarne Stroustrup wrote or co-wrote four of them in as many months, all with numerous typographical errors) and do not in my view make a case that C++ is or will be fine although that's how they're intended.
- wereallterrrist 4y agoBased on the way Rust naysaying has gone over the years... its just amusing.
- Kenji 4y ago[dead]
- ZephyrBlu 4y agoWhat tends to drive change? Growth and young people. New developers and young people are not choosing C++ as a language these days. Rust is 'hot' and has much more mindshare even if it's not being used in large enterprises much yet. What are the demographics of the developers you talk to? That may clear up your confusion.
- johnny22 4y agoIsn't it being used in large enterprises now? Or do you mean specific projects in large enterprises. IIRC rust is being used in the bluetooth stack for Android, and to power services like https://discord.com/blog/why-discord-is-switching-from-go-to-rust https://discord.com/blog/why-discord-is-switching-from-go-to..., plus various parts in Meta and at Microsoft. It's likely gonna be in chromium https://security.googleblog.com/2023/01/supporting-use-of-rust-in-chromium.html https://security.googleblog.com/2023/01/supporting-use-of-ru... and perhaps even in the Linux kernel someday. It's also part of fuchsia which is shipping in all those nest devices. I wonder when folks will decide it's really "made it".
- sk0g 4y agoAs a young (enough) programmer, I'm keenly learning C++. Not because I love the language though, but because I am interested in game development, specifically in Unreal Engine for now.
- maxloh 4y agoI agree to you. There whole C++ thing is too unnecessarily complex. In order to just compile a single Hello world program, you need to install the standead library, a linker and a compiler, each with their own version. There is too many ways that compilation could fall, and fixing them requires extensive knowledge about different aspects, like how linker works, how is C++ standardized, etc. The error message you got is really unhelpful. Missing a virtual keyword in a destructor, and you got a few hundred lines of error message and none of them mentioned "virtual". Segment fault is hard to trace because you do not have any error message at all. Rust is just a lot simpler because it remove/abstract away lots of complexity. Just install Rust with rustup and it will just work. Error message is pretty helpful too.
- bpye 4y agoC++ is definitely very sticky. I’m not yet convinced that Rust will successfully displace it in projects like LLVM or WebKit. Components perhaps, but I think we’re quite a way from these sort of major projects being written in Rust, though I’d be happy to be proven wrong.
- mustache_kimono 4y ago> I’m not yet convinced that Rust will successfully displace it in projects like LLVM or WebKit. This comment induces a sort of cognitive dissonance in me. Rust is in the Linux kernel, and Firefox. How are LLVM and WebKit different? Of course, Rust may not displace C++ everywhere. Is that what you were saying?
- bpye 4y agoThat's sort of what I was getting at. It seems incremental adoption is likely, but I'm not sure anyone is seriously going to try and rewrite all of Firefox or Linux in Rust.
- fbdab103 4y agoThose are some of the largest public projects in existence. Even if you went with a "traditional" alternative (D? Swift? Ada?) - there is no way such an effort would not take years. Incremental is the only way to transition such behemoths.
- pitaj 4y agoNot to mention that Chrome developers are working on bringing in Rust: https://security.googleblog.com/2023/01/supporting-use-of-rust-in-chromium.html https://security.googleblog.com/2023/01/supporting-use-of-ru... If anything, I'd think a browser is prime real estate for Rust, where the security guarantees are just that much more important.
- throwaway894345 4y agoBrowser dev was precisely Rust’s motivating use case.
- queuebert 4y agoPeople said that about Cobol. I would expect C++ to be around for another century at least.
- __jem 4y agoJust to be clear, "legacy" doesn't imply "not used." Something can be legacy and very widely used. The question is about growth and new projects.
- MuffinFlavored 4y agoJava + C# for sure Existing projects for sure New projects from scratch reaching for C++ off the shelf? Probably just video games maybe?
- mlindner 4y agoEven the most ardent Rust supports aren't going to say C++ will disappear. Name the last green field Cobol development however.
- jacquesm 4y agoFrom my own experience with that branch of industry: you won't hear about it because it is likely not open source and those building it don't bother with such things as online communities for project visibility and so on. But in government and very large businesses (banks, insurance companies, airlines) I would not be surprised at all if there was still greenfield COBOL work done. Just not nearly as much as say in the mid 80's.
- theshrike79 4y agoThat "green field" is pretty sure only done because all the fields next to it are made of COBOL. If they truly have a green field to develop on, nobody will pick COBOL.
- jacquesm 4y agoAh, the 'no true green Scotsman' argument ;)
- jimbo9991 4y agoNo you are not alone in being shocked by that statement. What they could have more accurately said is that C++ is becoming a legacy language within the subset of programmers that contribute to wide open open source projects hosted on GitHub. This is an important factor to consider for a project like Fish, given that the viability of the project depends entirely on getting (quite often very young and very bought in to the latest hotness) programmers to contribute their free time. Serious business obviously still writes in C++ more than rust and so it isn't legacy, but I can see why somebody may not be excited about spending their free time writing C++, and so Rust is the better choice if it gets people excited to contribute.
- tayo42 4y agoI can see that being true then. I still don't see jobs paying a tc of 250k+ for rust jobs. Those exist for cpp.
- gopalv 4y ago> I still don't see jobs paying a tc of 250k+ for rust jobs. Those exist for cpp They are out there, though the "in Rust" is part of the footnote usually. I interviewed recently for a 350k+ job involving rust and the odd thing about it was that I'm an okay C++ programmer, but I'm about as good as the average rust programmer because it's not been popular for that long. Nobody is asking for a decade+ experience on rust, only that you don't run away from it when you hit compilation fights with the borrow checker. This is not just about Rust though, but because I'm a second systems sort of engineer who can go in replace an aging C++ platform slowly by rewriting bits of it or modularizing it as we go. And the pay matches how badly they want to tear out the tech debt in the rewrite pass (also how horrible it will be for the first 8-10 months).
- jasonhansel 4y agoCOBOL programming also pays good money. It's usually when a language becomes "legacy" that pay starts rising, because the supply of interested programmers starts drying up.
- rtpg 4y agoI think that C++'s build system difficulties are _huge contributors_ to people not feeling like C++ is "worth learning". People do the C/Rust comparison, but at least C has a simpler mental model so is a different thing. I feel like C++ has similar, if not more, complexity to Rust and is harder to onboard. I do think there are domains where "let's use Rust" are a bit ... aspirational more than anything (anything related to graphics or OS integration...). And there C++ makes a lot of sense. But I think that day by day the number of projects where C++ is the only obvious choice goes down. Hell, it's been going down since Java!
- __jem 4y agoPeople always assume people who like Rust and are a bit more hesitant about C++ are just hype driven haters. I'm mostly exposed to C++ through my hobbies in creative coding, graphics programming, etc., and I would like to be a better C++ developer and be more comfortable with those projects. But every time I have to set up a new project it feels like death by a thousand cuts, and the fun art project I was about to work on just becomes a painful chore. I never, ever feel this way with Rust, even though it's significantly more immature in this space. Maybe I'm just one of those spoiled younger developers who expects great DX on all my tools, but it makes me really reluctant to invest more time into learning C++ when I could be contributing to open source Rust and improving the ecosystem. Getting better with C++ just feels like learning an endless series of sharp edges.
- vvanders 4y agoThis was something that Microsoft did really well back in the Visual Studio days. That said Rust really raised the bar not just on tooling but the whole end-to-end experience and with cross-platform being table stakes now it really makes for a compelling choice.
- pjmlp 4y agoWell, it is no surprise given their C++ investment, that Microsoft keeps briging more Rust like experience into Visual C++ then. They are adopting Rust in some small spots like Azure Sphere, and Rust/WinRT, yet WinDev, XBox, Office, .NET (for the runtime), DirectX aren't getting rid of their C++ code anytime soon. Rust experience is compeling if one doesn't need to rewrite the world, e.g. doing CUDA in C++ versus Rust.
- cmrdporcupine 4y agoYeah, it's insane. You're not alone. I have had a career working in C++, but also love Rust and was paid to work in it for a while. But most people in the industry I casually talk to -- who aren't a particular kind of open source or language nerd etc. -- have barely even heard of Rust. There's no way it's legacy. Rust might attract new devs to the project, sure. But at the same time, quality software mature developers work diligently with the tools and frameworks they have and improve things iteratively rather than trying to burn down and rebuild everything. And rewrites in general, no matter the language, are on the whole dangerous and harmful ventures that usually lead to trouble. As per the classic Spolsky essay. Still, I wish the fish folks luck. If they can pull it off, all power to them.
- pkulak 4y agoThey do say it’s more of a port than a rewrite. They aren’t trying to do everything a new way this time around. That’s usually the downfall of a rewrite. I’ve done these kinds of ports before. After you get used to it, you can almost shut your brain off and just start copying lines (so long as the languages are similar).
- lifthrasiir 4y ago> But most people in the industry I casually talk to -- who aren't a particular kind of open source or language nerd etc. -- have barely even heard of Rust. There's no way it's legacy. While Rust is still too young to make C++ a legacy alone, the transition has been long underway. "Scripting" languages, managed language runtimes, and a popularity of web development has greatly reduced needs for C++. Nowadays no one writes a web server in C++ [1], not because it is not performant enough for its job, but because other languages are better suited to provide a tradeoff between development experience and performance. C++ will continue to have lots of niches for coming decades, but is already a legacy in many enough fields. [1] Well, not really! First and foremost I have written a C++ web server as late as in 2016. But we needed a very good reason to do so, and any further logic was delegated to C#.
- jandrewrogers 4y agoThere is a lot of new state-of-the-art code being written in C++. I work on code bases that use both Rust and C++ which may seem odd to the casual observer. The reality that isn’t often acknowledged is that they excel at different things despite both being systems languages. For some kinds of software, C++ has far more finesse than Rust, the latter being a bit of a blunt instrument when very complex state interactions are involved — “safe” Rust implementations are comparatively bloated and slow. Rust works better with when state interactions are a bit more linear and straightforward. The way I am seeing it shake out is that C++ is used for the core and Rust is used for skins and interfaces around the C++ core. It plays to their strengths to some extent.
- randomdata 4y ago> despite both being systems languages. That's an interesting statement. While you can most definitely write systems in C++ and Rust, they really start to excel when you are in the lower layers of the stack where many other languages start to fall short. What is the significance of calling attention to systems development in particular?
- cozzyd 4y agoYes, at first I thought this was satire...
- shaklee3 4y agoyou're correct. c++ isn't a dying language, and it's getting better every 3 years. the rust crowd likes to use that meme to gain adoption, but in the real world c++ is still dominating with no signs of stopping.
- throwaway894345 4y agoC++ isn’t dying, but it hasn’t been dominating since the early 2000s. I have a lot of grievances with the overly-enthusiastic Rust folks, but I haven’t heard them say that C++ is dying as a selling point for Rust. Frankly, Rust sells itself over C++ pretty effortlessly—hell, Cargo versus CMake is enough to get a lot of experienced C++ folks to switch to Rust (never mind the safety features). Anyway, C++ is just getting new features every 3 years—these features are often really great additions, but they’re limited by compatibility with existing features (they’re not the best they could be) and not having legacy features in the first place is an enormous and overlooked value proposition.
- shaklee3 4y agounfortunately, the facts disagree with you: https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/ it's still dominating and gaining. > but they’re limited by compatibility with existing feature no, they deprecate features as well. this is why the auto keyword of pre-c++11 doesn't work anymore
- lifthrasiir 4y agoUnfortunately, Bjarne Stroustrup himself disagrees with you that TIOBE represents the "facts": > Most of the popular measures basically measures noise and ought to report their findings in decibel rather than "popularity." [1] I believe he is wise enough to not change his opinion when TIOBE designated C++ as the Programming Language of the Year 2022 (which would mean, borrowing his words, C++ somehow kept making lots of noise). [1] https://stroustrup.com/bs_faq.html#decline https://stroustrup.com/bs_faq.html#decline
- 4y ago
- habitue 4y agoPeople are making arguments here about whether it's legacy based on number of projects in C++ or # developers who know C++, and that's just wrong. It's unnecessarily conceding the argument that we can't compare languages on the merits, which we can. Cobol is legacy compared with C++, when C++ was new. You can see it immediately, the new language is just better than the old one, the writing is on the wall. All of the arguments for C++ boil down to path dependence ("We have X million lines in it", "obscure platform X isn't supported by clang", etc) there aren't good arguments for a new project to pick C++ over Rust. So it's legacy because Rust dominates C++. It will take time for that to play out and for the amount of code in rust to exceed the amount written in C++, but it's true. (There's an additional argument one might make that Rust is a niche language that won't gain traction, but we're far past the point where that argument can be taken seriously, with Rust in the Linux kernel, and Amazon, Google and Microsoft all adopting it)
- kaba0 4y agoC++ is still the de facto language to write truly performance-oriented programs. While I do find Rust refreshing in that it actually brings something novel to the PL space, let’s not put the horse before the cart. While I’m optimistic about Rust’s future, it is still a tiny niche language compared to bigger ones, especially C++ in their targeted niche.
- habitue 4y agoOk, I will wait.
- aldanor 4y agoYou can't write "truly performance-oriented programs" in Rust" but in C++ you can? Mind expanding on that?
- kaba0 4y agoCpp is the de facto language for that, it’s not that it is impossible to do so in rust. But there are certain patterns not as well expressible in rust.
- spacechild1 4y agoYeah, that's pretty ridiculous! It will take decades before C++ can be seriously considered a legacy language.
- strus 4y agoI write code in C++ professionally and I do not see anything wild about that statement. It is very rare to start a new project in C++ outside of a few domains (high-performance finance, game development). There are more and more "C++ successor" language projects started by people even from C++ committee. I see more and more very well known people from the C++ community starting to learn Rust. C++ is really unpleasant if you want to hop-in into some project. External dependencies (in most cases manually handled), various build systems (including custom ones - every project I worked on used a different build system!), various standards - ex. we have C++23 around the corner, and Fish has stayed on C++11. If you work in C++ you will stumble upon code from C++11 (or even earlier) to C++17. Learning C++ with intention to work in it means you need to basically know every standard released. I don't think anyone should learn C++ nowadays if they don't have too - the only exception is if you are really interested in the industry that mainly use C++ and it doesn't seem it will change.
- jmartin2683 4y agoDo you know anyone who is actively excited about learning C++ right now?
- pjmlp 4y agoMost students doing game development degrees.
- jmartin2683 4y ago…by choice?
- pjmlp 4y agoNo one forced them to apply.
- d12bb 4y agoGame dev is large part C++ exclusive because of legacy (the widely used engines were started long before Rust existed), so does one really have a choice if the goal is learning game dev? In the end, you learn what you need to accomplish your goal, even if you'd prefer other tools.
- JeremyNT 4y agoWell there's also a difference between what people want to work with at $DAYJOB and what scratches the itch for open source development on the side. If you're already working with c++ you know you'll be far more effective to continue doing so for some time, and it's hard to justify telling your employer to spend your time switching to something else. For a hobby or side project, though? You just do what is interesting and fun, and maybe working with new languages is fun to a lot of people. This could account for the (perceived) difficulty in finding c++ contributors, despite the prevalence of c++ in existing code bases.
- avgcorrection 4y agoFish is a shell that real people use. It’s part of the real world.
- deleted 4y ago[deleted]
- jenadine 4y agoIn my experience, it depends on the kind of development. For hobbyist and open source development (myself included) it is right: C++ is just legacy. But in the professional industry, C++ is still alive and strong. Lots of professionals are comfortable with C++ and don't want to ear about Rust or anything else. All my customers paying money are using C++. Even for new projects. That said, I can see a growing interest for Rust in the industry as well. So this might change really soon