3 ms·
This is even more the case with the C++11 syntax enhancements, which reduce the verbosity of C++ a lot. Maybe true. I bailed from the C++ world before C++11 b
by sillysaurus3 12y ago
This is even more the case with the C++11 syntax enhancements, which reduce the verbosity of C++ a lot.
Maybe true. I bailed from the C++ world before C++11 became pervasive. But if you use C++11 you risk leaving VS2010 users (and below) in a situation where they can't use your code at all: http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-...
And C++14? No idea what version of VS supports it. But using C++14 will definitely mess with people who have older compilers. And those people don't always have the luxury of just buying the latest version of VS.
Who cares about Windows? Well, anyone who's into the open source movement should be sympathetic to people who are forced to use a certain operating system but still want to get into programming. The spark for people's desire to become programmers often starts by wanting to customize their environment. That leads them to shell scripting, which is a stepping off point into more advanced programming.
The main point is simply that the C++ ecosystem has so many "gotchas" and timesinks that when forced to choose between C++ and C, an experienced programmer will save time with C, mainly because their years-old patterns will work regardless of what environment they're in. There are still some gotchas, of course; you can't use unix signals and expect them to be cross-platform. But it's far more straightforward than trying to get your codebase compiling on five different compilers.
Of course, choosing Python or some higher level language is almost always the best cost/benefit tradeoff.
- cageface 12y agoC++ standards compliance is better now than its ever been. You can't have a nice modern language and expect to support a four-year old IDE too. C++14 is mostly a minor refinement of C++11. You get a much nicer language already in C++11 that you can use pretty freely on modern platforms. Sure, use the highest level language you can afford to use. But I can't agree that experienced programmers will in general choose C or be more productive in it. The counter-examples are almost too numerous to even know where to begin. Surely the people behind Photoshop, Chrome, Renderman and Cubase etc. are aware of C and made a conscious decision not to use it.
- sillysaurus3 12y agoIf you set your own standards based on what everyone else is doing, you'll never hit the high notes. When you're a single programmer, you shouldn't look at what large groups of people are doing. Large groups often have no idea what they're doing, too, so that mindset is unproductive in general. Many of the reasons are political, not technical: suggesting that everyone be forced to program in Python to the exclusion of C++ denies your company the expertise of all C++ programmers. For some industries, like Renderman's or Photoshop's, that would be suicide. There are many reasons Tarsnap is written in C and not C++. Colin was aware of C++, yet chose not to use it. If one of the smartest and most experienced programmers choose not to do something, it's worth understanding why. Perhaps they were avoiding pitfalls that you may be in danger of falling into. On the other hand, if Colin were forced to program in C++, I'm sure it would be wonderful C++. So the point of C vs C++ may be moot anyway. What matters is that a programmer is experienced and competent, not necessarily what tools they're forced to use.
- cageface 12y agoI choose C++ precisely because I am a single programmer. I can't afford to waste any time writing code that doesn't translate to a user feature. I write a lot less boilerplate and spend less time chasing bugs using C++ than I would in C. If you're happy coding in C then by all means continue. I'm just a little tired of all the C++ critics that insist that only naive or inexperienced programmers use it and they'd all be equally productive if they'd just man up and use C for a while. Down votes are not coming from me, by the way.
- sillysaurus3 12y agoC++ critics that insist that only naive or inexperienced programmers use it and they'd all be equally productive if they'd just man up and use C for a while. I would never say such a thing, because I don't believe it. Who cares about downvotes? Our conversation was fun. Thank you for it.
- mtdewcmu 12y ago>>I'm just a little tired of all the C++ critics that insist that only naive or inexperienced programmers use it and they'd all be equally productive if they'd just man up and use C for a while. I'm not sure where you run into all those C++ critics that prefer C. Programmers that like to write C seem pretty rare to me. The criticism flows both ways: for example the C++ FAQ (http://isocpp.org/wiki/faq http://isocpp.org/wiki/faq) labels every feature that's in C primitive, dangerous, and obsolete. I don't see C++ programmers as naive and inexperienced at all. The biggest problem with C++ is how complex and difficult it is. It might have been considered friendly to newbies at one time, but nowadays I'd be surprised to hear that an inexperienced programmer was using C++. These days it's associated with native code and high performance (C is either lumped in or ignored).
- SamReidHughes 12y ago> Who cares about Windows? Well, anyone who's into the open source movement should be sympathetic to people who are forced to use a certain operating system but still want to get into programming. But C++ is also much nicer to use on Windows than C.
- com2kid 12y ago> . But if you use C++11 you risk leaving VS2010 users (and below) in a situation where they can't use your code at all And embedded developers! Don't forget us. C++2003 if we're lucky.