C++0x Concepts fall

This is a discussion on C++0x Concepts fall within the General Discussions forums, part of the Community Boards category; I haven't been following Kevin's column for some time. So when I got Artima's newsletter today, it came as a ...

C++0x Concepts fall

I haven't been following Kevin's column for some time. So when I got Artima's newsletter today, it came as a shock to me.

Buried in the list of new articles, in 4th place -- after such otiose articles as a discussion on Ruby's arguable responsible programming characteristics or the hundredth AIR advocate interview this week -- is the actual news of the year; Concepts have been dropped from C++0x. Artima's here and Kevin's here.

Now, I'll take the stance no one seems to want and ask what the hell have these folks been doing all these years. The last paper on the matter was published in January 2006. Since then, there has been no new developments. When last year, around August if memory serves me right, Stroustrup presented the new features to be discussed on this meeting exactly, he mentioned concepts and devoted quite a few paragraphs to it. Just didn't he know he's work was incomplete? Why not just say it then, instead of waiting until last month (pdf link)? I'll let go a little more air and say that since we hardly heard of Dos Reis since 2005 and Stroustrup was busy writting his new book (as if there weren't enough C++ for Beginners material) it's no wonder Concepts never really were. Or should I say, it was a nice concept?

Last edited by Mario F.; 07-23-2009 at 09:04 AM.
Reason: had a wrong link

Having a standards committee is a double edged sword. While it is nice to have a diverse group of people studying every problem from every angle to discern any problems, it comes at a cost. That cost is that moving forward becomes difficult due to the amount of people that must be satisfied with every change.

These costs and benefits can be exemplified in the differences between OpenGL and DirectX. OpenGL is managed by a standards committee whereas DirectX can move at whatever speed Microsoft deems necessary. Guess which one of these is lagging behind the bleeding edge graphics technologies?

Geez, the committee is run by a number of blockheads. They argued for the feature for so many years and then dropped it? Morons!
Concepts was a really nice feature that I would have liked.
And what is the article spouting about otherwise? Namespaces bloated?
Why can't the committee just do one step at a time? Implement a small version of concepts, see how it goes and then evolve it.

Concepts are a great idea of course, but I really think that the way they were planning to implement them was too complicated. Personally, I would have just incorporated ordinary templates into the scheme. Whenever the compiler encountered a concept it could simply attempt to compile the template associated with it, and if it failed then there is no match. For example:

Elysia, I really don't think you are in any position to call the committee names. How closely have you followed the process? What do you know about the history of the proposal that lets you be a judge in the matter?

It's not true that there were no recent developments. For the last two years, the committee has tweaked, revised, and integrated concepts with the rest of the language. Integration, especially with the library, was a very complex task, and uncovered many weaknesses, both of concepts themselves and of other language features, such as rvalue references.
Kicking concepts out of C++0x was the admission that they underestimated the complexity of the task. Concepts are too complex - they were effectively designed by committee, and lacked a usable real-world implementation. This lack meant that too many practical issues were not immediately obvious, which explains why it took the committee so long to remove them - it wasn't until very recently that they realized just how much more work would have to go into concepts to make them work.

This lack meant that too many practical issues were not immediately obvious, which explains why it took the committee so long to remove them - it wasn't until very recently that they realized just how much more work would have to go into concepts to make them work.

This makes sense, naturally. But I can't find anywhere a description of what these issues where. I expect that information to be revealed soon, since I feel an explanation is required. Certainly some of the issues I will not understand. But I'd feel a lot better knowing it's not just politics or trifles.

I do not object to the Committee decision. Let that be clear. If it's not ready, it's not ready. Neither I am in favor of partial solutions that "grow in time" because there would be a serious risk of hitting a dead end and then the language would be left weakened with a feature that couldn't be removed neither it could be finished... only patched. Hey, I support the Committee decison!

But I do question the work that was done on this issue, CornedBee. Can't avoid it. The Joe Coder thread is three months old. It starts with a simple question that should have been answered 3 or 4 years ago. But during all that time, concepts where introduced into all the drafts and contrary to what you say, I can't see anywhere where concepts differed significantly since the 2006 paper. I'm left with the impression there has been hardly any work done on them to address the concerns that were raised during all these years.

They are different now. Oh yes, they are. One month before the meeting Stroustrup finally publishes a new concept on Concepts. Too late, don't you say? And all because someone asked "Will an average programmer want to use concepts?". Oh, please!

edit: edited the original post. Only realized now I was linking Artima's post to another topic altogether.

edit 2: Concerning the first paragraph of this post, here's the Stroustrup's detailed explanation, published yesterday. I cannot stop feeling that this wasn't a well planned project. Within my limited understanding, all this seems like somewhere along the development of this proposal, the authors lost focus of its objectives. Not only that, but at large ignored the debate until too late. Until 3 months before Frankfurt.

Elysia, I really don't think you are in any position to call the committee names. How closely have you followed the process? What do you know about the history of the proposal that lets you be a judge in the matter?

Maybe not. It's an opinion because from the little I have "seen" which is mostly what has been presented in the thread seems to tell the tale that they simply dropped it because it was too complex, or lacking or just because there was no real world example of it.

Now, if it is true that they simply didn't have time to make it work right, then I can understand, and then I would agree that it would need to be cut out and delayed. I will not forgive them if concepts do no see light of day. But I will forgive them if the concepts appear in a later standard.
Frankly, though, I'm disappointed. Too much discussion and too little real world experimentation with the feature is what it looks to me.

Frankly, though, I'm disappointed. Too much discussion and too little real world experimentation with the feature is what it looks to me.

Indeed. I find it astonishing that 3 months before Frankfurt the head of the library team is still discussing whether Concepts are adequate for the average Joe. But I find it even more incredible the fact that such core concepts as implicit mapping are still being discussed. Is this a joke? What have they been doing? I don't pretend I know the inner workings of the C++ Standards Committee, but these type of things should have been agreed upon at most by the end of 2008. The last meeting of any standards body before implementation (which is what this meeting was) should be a near ad-hoc meeting meant to establish deadlines and gather final impressions and minor adjustments.

The funny bit is that I don't take sides on this matter. The only side I take is that of a generic agreement to the decision to not implement Concepts, given the situation. But there should be no patting on the back. This is a big failure and instead of painting it in pretty colors, or pointing fingers left right and center, I feel instead they should consider this everyone's failure. C++0x is a dissapointment in the way it was conducted.

Meanwhile, C++0x was to be taken literally. It will be either C++0xA, or maybe C++0xB.

No. Move semantics aren't dependent on Concepts. rvalue references stay. As do most of the other features in 2008 draft. Do not forget that this draft didn't include a Concepts library and many of the proposals that "depended" on it where so only for a matter of consistency, probably. Prior to the 2008 Draft they didn't use Concepts and were still perfectly functional proposals.

These costs and benefits can be exemplified in the differences between OpenGL and DirectX. OpenGL is managed by a standards committee whereas DirectX can move at whatever speed Microsoft deems necessary. Guess which one of these is lagging behind the bleeding edge graphics technologies?

I wouldn't say Direct3D is ahead of nor behind OpenGL. They are both at about the same place. But at MS they have an entire dev team devoted to Direct3D so it is really not fair to compare the two. Besides Direct3D is just an interface to the HAL which means hardware manuf. come out with new ideas, hardware manuf. implement them on the card, D3D gurus write the interfaces in D3D, and driver gurus implement the interfaces. There a whole lot more people involved than just Microsoft when it comes to the advances in Direct3D.

The source of the advances is buried deep within the walls of NVidia and ATI.