I only use C++ for native libraries accessed from Java/.NET, so it doesn't hurt me that much, given the average code size.
But things are much nicer nowadays than on the late 90's when I had to use the OS vendor C++ compiler for each system we were targeting, while ANSI was still designing what would become C++98.
Or the C compilers transitioning between some kind of K&R C support and ANSI C89.
I know a lot of companies that immediately adopt the new standards in C++, sometimes as soon as the compiler supports them, even if the standards aren't official yet.
For example, I was working at a company that was using C++14 features in 2013.
Right. We now have two world class compilers, gcc and clang, which both track the standard closely and this has forced Microsoft to improve their compliance as well. It is a golden age for C++ right now.
The golden age of C++ is that java, python, ruby, clojure javascript and so on all exist so developers who have a dislike and/or perhaps low aptitude for C++ aren't in your codebase because it really isn't the only game in town.
Compiler support, standardisation of things we needed in the late 80s sure. great, yeah, all good and helpful.
Not having a constant standing fight to keep the worst nasty rubbish out of your codebase so you can get on with writing code that achieves something useful in a manner that's not hideous. That's a change that didn't come from within C++.
C++ culture from Bjarne on down is still hideous. Arrogant, aggressive and generally nasty. Fix that and we'd really get the golden age. I stay as far away from C++ "people", committees, conferences etc. as I can. Yeah "No loss" would be the usual response and I'm sure that's true, I'm not such a genius that the loss of me matters at all. There will be plenty more, some of whom have great contributions they will make elsewhere, to think otherwise is just the usual C++ "smart people" nasty, competitive arrogance.
C++ is pretty much the only game in town for those having those alternative languages running at all.
When LLVM, GCC, JVM and CLR stop being written in C++, then we have sound alternatives.
Java Metropolis or .NET Native with Rosyln are not there yet.
Rust doesn't seem to be taking over systems development at any major commercial OS for the time being. Hopefully it will, if Fuchsia ever becomes a commercial product.
Swift is pretty much an Apple only language and isn't fully stable yet.
So until then, I rather take a polyglot approach C++ and Language X, while helping drive away the C style coding that plagues our stacks.
This might be a sloght departure, sp forgive me, but what exactly is going on with Rust? Their user base is rabid and loyal as any as I've seen, and their evangelists spout out content at a fair pace, but it doesn't seem to be gaining a huge amount of popularity (I may be wrong, but I've seen very little demand/job postings). Has it just not hit critical mass, is there not enough general utility or is the thought of leaving a language with a C in the name just too frightening?
The actual Rust developers are not like that, they are quite friendly and help anyone that wanders into their forums.
Google is already using Rust on a few ChromeOS and Fuchsia libraries.
Firefox is getting more components ported from C++ into Rust.
Microsoft adopted a regexp engine, written in Rust, for Visual Studio Code.
So some victories, but the language still needs to mature in a few domains, UI, IDE, DB drivers, graphical debuggers, processors, and these things take time.
It took C++ almost 20 years to steal some industries from C, while others still choose C and Assembly as their daily tools.
It takes years to replace tooling, and many times the sucesses are not only technical, but are heavy influenced by social and political reasoning.
Many don't explicitly hire Rust devs, but hire devs in general, as they won't just be working on Rust projects, but also on others. That's not always the case, but it's common. For example, Amazon recently posted a job listing saying that "Rust knowledge is a plus," that's because a small bit of it is in Rust, but you need to be familiar with other tech too.
If you want to /write/ code there are many options. The most significant of the ones I listed is Java. If you don't like C++, pointers and such Java is actually a nice language and people can and do get jobs programming in that language and do good work there. They don't write code in my C++ code base anymore. The overwhelming majority of people writing C++ nowadays actually want to write code in C++ and have alternatives where they can get paid, well, if they didn't. It really wasn't always that way.
There is more to a project than a programming language used in isolation.
There are many scenarios where C and C++ are the only mature tools available. Unless you want to play the snowflake using unsupported tooling and willing to take full responsibility when things go wrong.
Given that, I will pick C++ over C every single time.
And anyone who buys this line doesn't work on /those/ projects if they don't like C or C++ and are not in /your/ codebase. They're doing programming something else entirely (maybe in javascript, for example?), hopefully well, not writing C++ code you have to deal with, badly. Do you see the point I'm making?
Given that, this comment and thread was never about C++ vs C but I acknowledge this is the default C++ flame war that has been going on for decades so bringing it up, out of context and with zero supporting reasoning let alone evidence really illustrates the point about the problems of the C++ community nicely, thanks for that. Imagine a golden age of C++, it'd be awesome.
so if you don't want to work in C++ you work on somethingelse But you're still a programmer who likes writing code. You only program in C++ on projects where this makes sense if you like it. Do you not see this point. I'm not sure how to articulate it more clearly?
"I understand what you are trying to say and I think that you are wrong." --Bjarne Stroustrup, to a chorus of razzes, jeers and laughter at a question in going native a few years back.
But hey don't take my word for it, my reputation is nothing and I'm as anonymous as a wrong number whether I like it that way or not. How about Ken Thompson? His doesn't seem to be similar, if you like an argument from authority - and I think such argument has a place if not used exclusively.
"I would try out the [C++] language [at AT&T] as it was being developed and make comments on it. It was part of the work atmosphere there. And you'd write something and then the next day it wouldn't work because the language changed. It was very unstable for a very long period of time. At some point, I said, no, no more. In an interview I said exactly that, that I didn't use it because it wouldn't stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language."
Ken Thompson; cited in Seibel, Peter (2009). Coders At Work. p. 475.
Alexandrescou openly criticises Alasdair Meredith at cpp con in a way that isn't really friendly or respectful. He also finishes all his talks with "Destroy!" as an open acknowledgement of the defensiveness he feels about the naked hostility that exists in the C++ world. I like his stuff and the bulk of his attitude, I hate the context and that it brings rubbish like this out of him.
newsgroups (remember them?), c++faq - in which the most arrogant and hostile entries seem to correlate pretty closely with all the stuff widely acknowledged to be horrible (eg auto pointer, remember that?). Think about it, remember all the c++ places you've been. Which were really, actually, you know, friendly?
Compare the general tenor of it all to the Python community, the Perl community, the Ruby. Hell even compare it to the way the python community and the Perl community interact with each other and it's vastly more pleasant. C++ is just straight up nasty, competitive, "No you're wrong because I'm smarter than you" "I've been anointed" garbage and it needs to be called as such. It really holds everything back. If I had to pick a word to describe it that word would be "macho."
I think it's reasonable to suggest that if one has a point of view, make the argument, back it with your evidence, acknowledge that those who disagree are neither heretics nor idiots is the right thing on a number of levels.
I know it's unpopular, but I think security is overrated. No, I don't like the way it is, but really - do we know a company that gone bankrupt due the security breach? Do we know a single mobile app that lost it's major audience due the data exposure, or broken crypto implementation? Do we know any business that gone out of business due the security related reasons?
I'm not saying we should not care, but I'm convinced we can't turn the table over by polishing the tools. The user's perception of security is a show stopper as for now.
> I'm not saying we should not care, but I'm convinced we can't turn the table over by polishing the tools.
Why?
We know for a fact that GC'ed langauges can e.g. prevent double-free for ever and ever. Obviously, this is modulo the language/runtime implementation, but if there are bugs there you fix them once and every single program out there gets the fix instantly.
Similarly for many other types of 'dangerous' bugs.
23 comments
[ 3.5 ms ] story [ 52.5 ms ] threadIf it's in standard in 2023 we can use it at work in 2025-2027 for those of us at particularly fast companies
But things are much nicer nowadays than on the late 90's when I had to use the OS vendor C++ compiler for each system we were targeting, while ANSI was still designing what would become C++98.
Or the C compilers transitioning between some kind of K&R C support and ANSI C89.
For example, I was working at a company that was using C++14 features in 2013.
Compiler support, standardisation of things we needed in the late 80s sure. great, yeah, all good and helpful.
Not having a constant standing fight to keep the worst nasty rubbish out of your codebase so you can get on with writing code that achieves something useful in a manner that's not hideous. That's a change that didn't come from within C++.
C++ culture from Bjarne on down is still hideous. Arrogant, aggressive and generally nasty. Fix that and we'd really get the golden age. I stay as far away from C++ "people", committees, conferences etc. as I can. Yeah "No loss" would be the usual response and I'm sure that's true, I'm not such a genius that the loss of me matters at all. There will be plenty more, some of whom have great contributions they will make elsewhere, to think otherwise is just the usual C++ "smart people" nasty, competitive arrogance.
When LLVM, GCC, JVM and CLR stop being written in C++, then we have sound alternatives.
Java Metropolis or .NET Native with Rosyln are not there yet.
Rust doesn't seem to be taking over systems development at any major commercial OS for the time being. Hopefully it will, if Fuchsia ever becomes a commercial product.
Swift is pretty much an Apple only language and isn't fully stable yet.
So until then, I rather take a polyglot approach C++ and Language X, while helping drive away the C style coding that plagues our stacks.
Google is already using Rust on a few ChromeOS and Fuchsia libraries.
Firefox is getting more components ported from C++ into Rust.
Microsoft adopted a regexp engine, written in Rust, for Visual Studio Code.
So some victories, but the language still needs to mature in a few domains, UI, IDE, DB drivers, graphical debuggers, processors, and these things take time.
It took C++ almost 20 years to steal some industries from C, while others still choose C and Assembly as their daily tools.
It takes years to replace tooling, and many times the sucesses are not only technical, but are heavy influenced by social and political reasoning.
Many don't explicitly hire Rust devs, but hire devs in general, as they won't just be working on Rust projects, but also on others. That's not always the case, but it's common. For example, Amazon recently posted a job listing saying that "Rust knowledge is a plus," that's because a small bit of it is in Rust, but you need to be familiar with other tech too.
There are many scenarios where C and C++ are the only mature tools available. Unless you want to play the snowflake using unsupported tooling and willing to take full responsibility when things go wrong.
Given that, I will pick C++ over C every single time.
Given that, this comment and thread was never about C++ vs C but I acknowledge this is the default C++ flame war that has been going on for decades so bringing it up, out of context and with zero supporting reasoning let alone evidence really illustrates the point about the problems of the C++ community nicely, thanks for that. Imagine a golden age of C++, it'd be awesome.
This is the complete opposite of my experience. Most are among the most humble people I've met.
https://www.youtube.com/watch?v=OB-bdWKwXsU about 1:09:30
But hey don't take my word for it, my reputation is nothing and I'm as anonymous as a wrong number whether I like it that way or not. How about Ken Thompson? His doesn't seem to be similar, if you like an argument from authority - and I think such argument has a place if not used exclusively.
"I would try out the [C++] language [at AT&T] as it was being developed and make comments on it. It was part of the work atmosphere there. And you'd write something and then the next day it wouldn't work because the language changed. It was very unstable for a very long period of time. At some point, I said, no, no more. In an interview I said exactly that, that I didn't use it because it wouldn't stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language." Ken Thompson; cited in Seibel, Peter (2009). Coders At Work. p. 475.
Alexandrescou openly criticises Alasdair Meredith at cpp con in a way that isn't really friendly or respectful. He also finishes all his talks with "Destroy!" as an open acknowledgement of the defensiveness he feels about the naked hostility that exists in the C++ world. I like his stuff and the bulk of his attitude, I hate the context and that it brings rubbish like this out of him.
newsgroups (remember them?), c++faq - in which the most arrogant and hostile entries seem to correlate pretty closely with all the stuff widely acknowledged to be horrible (eg auto pointer, remember that?). Think about it, remember all the c++ places you've been. Which were really, actually, you know, friendly?
Compare the general tenor of it all to the Python community, the Perl community, the Ruby. Hell even compare it to the way the python community and the Perl community interact with each other and it's vastly more pleasant. C++ is just straight up nasty, competitive, "No you're wrong because I'm smarter than you" "I've been anointed" garbage and it needs to be called as such. It really holds everything back. If I had to pick a word to describe it that word would be "macho."
I think it's reasonable to suggest that if one has a point of view, make the argument, back it with your evidence, acknowledge that those who disagree are neither heretics nor idiots is the right thing on a number of levels.
I'm not saying we should not care, but I'm convinced we can't turn the table over by polishing the tools. The user's perception of security is a show stopper as for now.
Why?
We know for a fact that GC'ed langauges can e.g. prevent double-free for ever and ever. Obviously, this is modulo the language/runtime implementation, but if there are bugs there you fix them once and every single program out there gets the fix instantly.
Similarly for many other types of 'dangerous' bugs.