Hacker News new | past | comments | ask | show | jobs | submit login
Stroustrup on The C++0x "Remove Concepts" Decision (ddj.com)
19 points by scott_s on July 22, 2009 | hide | past | favorite | 21 comments



Woa .. this will sure upset Mr. Stepanov. The lack of the support for concepts was one of his main concerns about the C++ even back in 1995. I'm sure his feelings didn't improve dramatically since then.

  What is an iterator? Not a class. Not a type. It is a  
  concept. (Or, if we want to be more formal, it is what    
  Bourbaki calls a structure type, what logicians call a 
  theory, or what type theory people call a sort.) It is 
  something which doesn't have a linguistic incarnation 
  in C++. But it could. 
http://www.sgi.com/tech/stl/drdobbs-interview.html


I don't expect this to make C++0x any less of a train wreck--it would take an act of God to do that at this point--but it's interesting to note that most standards committees see their role as codification of existing practice, whereas C++0x and the previous standard before it have had a marked tendency toward invention.


Do you really consider it a train wreck? There seem to be some useful new features.

The tragedy, in my opinion, is that we don't have more to show from a decade's work by so many brilliant people. C++ is straitjacketed by ISO standardization.


Design by committee is a tricky business, especially if Bijarne says they are always aiming for the consensus and not a simple majority vote.

Even not considering C++, this approach is more likely to result in the acceptance of a feature that everyone feels equally "meh" about rather than something that "only" 80% really likes, but 20% opposes.


Just a fun fact: Haskell was designed by a committee. Just saying that it's not all bad :)


It was a train wreck beforehand. It has since gotten even worse. The remarks I made at http://news.ycombinator.com/item?id=598805 still stand, IMHO; basically due to backwards compatibility concerns, there are almost always at least three ways of doing any trivial thing in C++, and the interactions between them are terrifying.


we don't have more to show from a decade's work by so many brilliant people.

Well said. I use C++ and Perl primarily, and both languages suffer from this.


That's a feature, not a bug. Code you write in C++ today will probably compile and run 30 to 50 years from now with very little (if any) modification. Same is true for C. These are serious languages used on major projects (Joint Strike Fighter, Mars Rover, etc.) by governments, militaries and space agencies. They do not evolve quickly and when they do it is only after much careful deliberation. Don't get me wrong... I enjoy the new, fun, expressive constantly changing languages as much as anyone, but when I'm doing serious, mission-critical code, I use C++.


C++ has many compilers for loads of embedded platforms. It has to be standardized. It's not comparable to the languages with two or three implementations that all sit on top of Windows or UNIX. It is much harder to change C++ without hurting many compiler writers.


It's okay for them to be a little conservative. As we've seen with the likes of GNU extensions and Boost, it is certainly possible to move forward without perfect standardization.

But part of me also wants to put C++ on life support, and simply devote all time to the improvement of D (akin to temporarily moving Python 2.x forward until Python 3 is more mature).


Commercially, C++ is already on life support: it's no longer a general applications language but rather a niche language. Microsoft supports it in Visual Studio for the game industry and Intel supports it for the same as well as the HPC market. For all the rhetoric over C++ (it will either save or destroy C++ depending on who you talk to) its unlikely to make a big difference either way.

I think D is pretty cool, but it has a lot farther to go with regards to standardization as well as implementation. There is a current reddit thread going over its shortcomings:

http://www.reddit.com/r/programming/comments/93jh5/ask_progg...

Whether it wants to be or not, D is now in the same niche as C++, but without either the maturity or commercial support that a niche language needs to thrive. And that probably won't change now that the larger software world has moved on.


Qt and hundreds of KDE apps built on it are hardly niche. What about VLC? Gecko? WebKit? LLVM? All niche projects?

I don't know about the commercial application space, but in FOSS C++ is alive and well. And it isn't going anywhere for a long, long time.

For a new project, C++ is a much better choice than C, even if you don't use all features of the language. The compilers are faster and better than ever, and the libraries are great.

<UNRELATED> I, for one, have never seen a decent quality desktop application written in Java. C# has better apps because C# programmers seem to prefer using Windows.Forms on Windows and GTK# on Linux. But nothing beats the speed and responsiveness of an application running on the bare metal. </UNRELATED>


I, for one, have never seen a decent quality desktop application written in Java.

I hear eclipse is pretty decent.


I was kind of talking from the users' perspective.


Well C++ is used in console video games, but without RTTI & exceptions, even in large cases without new/delete (but inplace new). Templates are welcome, but if overused would produce bloat.

Almost no virtual functions, or at least forbidden at many levels, STL here and there, or custom STL (EASTL for example, etc.).

The C++ that we use in our studio (for runtime code, not tools) is more like "C" - Using RAII here and here, templates, and rarely classes (mainly for RAII debuging constructs), and using just POD structures (this helps a bit when deserializing objects, especially if they need to be streamed - as in a open-world game).


> Microsoft supports it in Visual Studio for the game industry

Microsoft supports C++ in Visual Studio because it's what Windows and all of its applications are written in.


> no longer a general applications language but rather a niche language

If by "niche" you mean "anywhere code has to run fast or in a small space." C++ is displacing C in embedded applications. The JIT compilers in Java and MS CLR are in C++. C++ is only growing for use in simulations, which remains a rapidly growing field.

C++ remains a good choice for GUI development, which is hardly niche.


I think it's fair to call that a "niche." C++ is a systems programming language with rich support for data abstraction, object-oriented and generic programming. Most applications don't require the kind of control over resources and the level of abstractions that C++ has.

This is progress - it used to be that the majority of programs had to consider processor and memory utilization as a primary concern.

The examples you gave are excellent examples of where it makes sense to use C++, but that's not what the majority of programming is now.


I think it really depends which lens you're looking through and which communities you're a part of. C++ is still one of the most popular languages around:

http://langpop.com/

It's naturally de-emphasized in the web world, but there's still a huge amount of C++ being written. Most desktop and a large percentage of systems, mobile, scientific and embedded code is written C++. There's just relatively little cross-pollination between those worlds and the web world.


I really like C++. I use python, I use ruby, but I don't enjoy either of them as much as C++. They feel "dumbed-down." And the speed has been nice many times.

I feel that one of the things really holding C++ back is its development model. The benevolent dictator open source approach seems to have proven itself compared to C++'s problematic ISO-standard process. For one thing, mistakes are locked in stone. Non-standardized languages handle mistakes through versioning, which tends to be a much better bargain for all involved.

At the same time, the ISO-standardization means that C++ has some much more computer-science orientated modules than you tend to see in other languages. The amount of thought and optimization that goes into everything is mind-boggling.


Given how enormously complicated C++98 is, let alone C++0x, I think the last thing C++ needs is to jettison the standardization process in pursuit of faster evolution. The evolution of C++ should be conservative: both because it is widely deployed on many different platforms and compilers for doing "serious" work, and because it already has far, far too much junk in it already.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: