9 ms·
Has C++ jumped the shark?
- arghnoname 16y agoThe author says he is content with C++ the way it is, yet he bemoans the good deal of time between major changes in the standard. This is a little inconsistent. As a language that takes a long time to master, changing fundamental features of the language every 3rd year, for instance, would be a bit difficult to keep up with. Furthermore, the niche C++ lives in isn't one that needs to change every year. For some users, language stability and backwards compatibility are key, and with things like Boost, additions to C++ can be tried out in the wild for many years before being standardized (as many features slated for the newest standard were).
- johndcook 16y agoI see how that could sound inconsistent. But I'm not bemoaning the time it takes between changes to the standard as much as pointing out that these long intervals show that the language is done. I'd rather see the standards committee give up than hurry up.
- dkarl 16y agoIt's fine for a language to be "done" or "over." It's still important until it has been replaced for practical purposes by another language. Until then, why not keep making improvements? I wouldn't put C++ on my list of favorite languages, but I expect my C++ skills to be an asset for a long time to come. As always when talking about the continued relevance of C++, I will celebrate when I'm proved wrong.
- greyman 16y agoI see your point, but agree with the parent comment more. The current state of the C++ just doesn't require the committee to hurry up, and the language is not done, even if it would take five more years to have new standard approved. As I see it, the new standard just isn't something which would change the future of C++ in some significant way, and it is not the most pressing problem C++ has as a language. From my perspective, what I would like to see more is some alternative to boost, with similar functionality but without that meta-meta-programming. ;-) Simply, more cross-platform libraries comprehensible for the average C++ programmers.
- CodeMage 16y agoI don't find it inconsistent at all. The author explains that C++ has become sort of a niche language for him.
- rbanffy 16y ago"Update: The ISO committee approved the final draft of the C++ 2011 standard 25 March 2011."
- faragon 16y agoI've written in C++ professionally almost 12 years (17 years counting College), and in my opinion it is a shame how the language has not evolved properly. Unsolved things: - Unified C++ ABI call for making shared libraries without worrying about compiler manufacturer or version. - Massive bloat. Take a look to the Boost libraries and cry. - Poor debugging tools for templates (debugging templates it is crazy, and the promise of easy template debugging is almost a decade old). Ridiculous things (in my opinion): - Obsession for doing everything in "user-land" (e.g. source code templates) instead of built-in abstractions at object code-generation time instead of compile-time. - Willing to introduce functional programing in the language, when, in my opinion, it makes more sense just to interface with true functional code (e.g. via SBCL). C++ hour will come, with a non-bloated, system-software capable, "better than C", which could be labeled "simple C++", as in "simple English".
- joe_the_user 16y agoTake a look to the Boost libraries and cry. Indeed! The thing I don't understand is that you go to the boost library website and you see that it touts itself as an all-volunteer effort. Who are these people who volunteer their time to produce this massively bloated, over-elaborated code? What is their motivation? What's going on here? I understand bureaucracies usually bureaucrats are paid and produce code and memos to expand and control their turf. But here? What's up? Boost certainly seems well done for what it is. But does this particular niche attract so many people?
- blub 16y agoYou shouldn't generalize. Saying 'X' about Boost is like saying 'X' about the US or Europe. There are many different components in there.
- joe_the_user 16y agoOK, I have slogged through quite a few boost libraries looking for stuff to use. If you can give me an example of a part of this "continent" which is "lean and mean" rather than over-elaborated, I'd be grateful.
- rakista 16y agoDon't make C++ into some fly by night whore language like Perl.
- lawnchair_larry 16y agoToo late? :(
- derefr 16y agoC++ is the only language I'm aware of where every extension made to the language is careful to only affect compilation time/complexity, while preserving the speed and operational semantics of the code at runtime. This makes it perfect for some domains, e.g. console game development, where the speeds required are only attainable by dicking around with pointers in C, but people want to use better abstractions than C is capable of. So no, continuing to add those extensions is not wasted effort; we'll still be learning and using them long into the future.
- wvenable 16y agoC++ takes a very simplistic view of runtime performance, however. Generics are implemented using templates; which instantiates the code for every type you use. Naively, this preserves the performance of simply writing the same code for each type (which is what you did before templates). However, that might not be the best performing way to implement generics at runtime. (Edit: Small change to make meaning clearer)
- johnny531 16y agoHuh? Templates in C++ are pay-for-what-you-use; only those instantiations required by your code are generated. Note also the ability to extern templates added in C++0x, which allow you to collapse common instantiations to a single object file.
- seabee 16y agoHow do those features impact runtime performance? One example of templates affecting runtime performance is poor use of the instruction cache due to code duplication in every instantiation of a template.
- corysama 16y agoIf you are instantiating equivalent functions (sorting foo* vs sorting bar* ) then the linker will merge their binaries -no dupes there. If you are generating different functions (sorting foo vs foo* ) then you are asking for different functions -no dupes there either. If you want to keep everything down to one function, qsort() didn't disappear when they added std::sort() and it is pretty close to what a dynamic language sort would do under the hood.
- ataranto 16y agoSince the browser most people are reading this in is written using C++, I'd say the answer is no.
- iuytghyjuyh 16y agoIt's still the most useful language but you do get the feeling that everytime some new paradigm is claimed for another language C++ goes "I can do that - and I will do that in a way that doesn't break C code from 1979 - however weird that makes the language"
- uuilly 16y agoLanguages are tools. Da Vinci with a mop and a bucket of mud would be a better painter than me. In fact I recently saw a video where Kelly Slater surfed a door and a coffee table as impressively as most weekend warriors surf on $700 custom shaped boards. Focus on your skill not the tools. Surfing is more about timing, fitness and knowledge of waves than it is about the board. Likewise coding is more about RAM, CPUs, HDs, GPUs, busses, networks and ultimately users than it is about what tools you use to manipulate them.
- jshen 16y ago"Likewise coding is more about RAM, CPUs, HDs, GPUs, busses, networks and ultimately users than it is about what tools you use to manipulate them." My coding is primarily about managing complexity through good abstractions, and sometimes doing optimizations. Different languages are better suited to good abstractions. Kelly Slater might use a coffee table for fun one time, but he won't use one for his next competition.
- MichaelGG 16y agoYou're right that people should be worried about their skills. But tools are a critical part of actually programming. It's like saying "famous author X used pen and paper, hence complaining that Word 2010 doesn't handle Y properly is silly - focus on your writing!" (Worse even, as for pure writing, the speedup between pen/typewriter/Word is probably less pronounced than between programming languages.)
- CWuestefeld 16y agoa video where Kelly Slater surfed a door and a coffee table as impressively as most weekend warriors surf on $700 custom shaped boards. I saw a table tennis player all excited about his new carbon fiber paddle. Then one of the club champs picked up the box the new paddle had come in and, using the box as a paddle, proceeded to defeat the player with the carbon paddle.
- deleted 16y ago[deleted]
- 16y ago
- Luyt 16y agoI use C++ often, and what I'd like to see are good datastructures, built right into the language syntax, like Python does that with dicts, lists, tuples, sets etc... I know that STL has these, but using them still feels like some grafted-on afterthought.
- eco 16y agoTR1 added unordered maps/sets (hash tables) and tuples. Maybe it's because I use STL every day but the interface works fine for me. It takes some getting used to but it's pretty consistent. With the operator overloading it feels just like any built-in language syntax (that's even more true with C++0x's initializer lists).
- alecco 16y ago2009? news?
- onan_barbarian 16y agoC++ has a fundamental problem: that of being a real language that added OO features and static polymorphism in great haste; unwise decisions during the early stages of C++ cannot be unmade after their negative consequences are apparent. There's some "good stuff" in C++1x, but of necessity, it's all additive, not subtractive. So the language gets bigger and more complicated. I've never met an adept C++ programmer who didn't aggressively cut the language down to a subset. The sad thing is that I've met good C++ programmers - and seen good C++ libraries and frameworks - whose subsets are quite distinct; they are 'divided by a common language', like the old cliche goes.
- rch 16y ago"Collectively, the committee is responsible for billions of lines of code." think about that a minute.
- echaozh 16y agoIt's still C++0x though. The x is now officially B.