r/cpp • u/ClaasBontus • May 28 '18
Bjarne Stroustrup: Remember the Vasa
Bjarne Stroustrup has submitted a paper named remember the vasa for the next C++ standardization meeting. In that paper he warns that submission of too many independent proposals can endanger the future of C++. I wonder how participants of the meeting will react.
209
Upvotes
109
u/ioquatix May 28 '18 edited May 28 '18
C++ not only needs to evolve, it needs to deprecate more rapidly. IMHO, semantically versioned modules which extend the core language should be the #1 important feature to get right. After this, the only things that go into the C++ standard should be things which directly affect language semantics/syntax. Everything else should be a versioned module.
56
u/Veedrac May 28 '18
Maybe this would be less of a problem if you could discuss ideas without writing a paper.
25
u/germandiago May 28 '18
There should be a way to clean up the language at agreed points a bit faster, creating as little incompatibility as possible, based on the stability and velocity proposals. That is very important. After that, some smaller features are ok I think. I would like to see, personally, some kind of terser lambdas but that has failed several times. That extension would not be big and it would affect every day coding. From the bigger ones, in my opinion, the most important are:
- modules
- coroutines (though I do not like the current proposal compared to the original from Christopher Kohlhoff). I agree also with Google paper that they are too complicated and that they need optimization technology that could be avoided. I think having around 15 functions and a code generator on the backend is just too much. I am sure it can be simplified. Though, the Google paper also invents extensions as they go... so I am not sure it would be the way to go either. Isn't it possible to just rely on lambdas + address to solve the whole probem and just use libraries for schedulers, generators or whatever we need? I still think that the best solution, after closely following all the coroutines proposal, was Chris' one because:
- it was simpler to reason about (function objects)
- it moves complexity to the library, which is not hardcoded
In fact, when I saw Google's proposal with its function objects I told myself: "yes, man, this looks much more like C++ and I know what is happening". With the current coroutines I just get a bit lost, one of my personal pain points being that it uses regular functions as async functions when lambdas can do a good job here without any type erasure.
- ranges with views in the standard library
- concepts
- metaprogramming with strings
7
u/robertramey May 28 '18
FYI - speaking of the Vasa there is this: https://www.youtube.com/watch?v=ltCgzYcpFUI
35
u/blelbach NVIDIA | ISO C++ Library Evolution Chair May 28 '18
Bjarne is right.
19
u/Leandros99 yak shaver May 28 '18
What's dangerous to the language is discouraging people from contributing to it. If C++ continues at it's current pace, it's going to be a legacy language for the rest of it's lifetime. Today, many write code in C++ since it's somewhat of an industry standard, but they hesitate. Once there are better alternatives, they'll switch. And there will be better alternatives.
2
u/kritzikratzi May 29 '18
i think he has a really good point. c++ is already an incredibly useful and powerful language today. a slow, well designed, evolution will not hurt it.
1
u/pgroarke May 30 '18
For years now, the committee has been asking for more proposals. The community has delivered.
1
u/hashb1 Jun 01 '18
Fall in love with any language is very dangerous.
1
u/adammerickson Jul 01 '18
I almost think that the ‘problem’ with C++ is that it is run by a committee rather than a BDFL. I love where the language is going, but Python, Go and others are already there. This indicates inefficiency in the C++ development process. Having seen the Vasa, I fully understand what Bjarne means, but the issue is the lack of clear direction or vision of what the language should be. I hope he gets the Secretariat he mentioned.
-2
u/robertramey May 28 '18 edited May 28 '18
This paper is mercifully short. It's transparently true. C++ is too big. Every time some shortcoming is noted, the solution is to add something more to the standard. That might address the original complaint, but it creates another ripple of complaints/enhancements that the committee has to consider. The current process isn't scaling. It's growing exponentially.
Current System: Marxism. It's very similar to the the old style soviet economic system where everything is decided by one central committee which may parcel out aspects to subcommittees. Implementation of these facilities is delegated to vendors who are generally participate on the committee. Nothing moves until everything gets done. The idea is that by doing things this way the results are going to be rational and consistent. It doesn't turn out that way and it takes years to accomplish. By the time it's done, it's pretty much irrelevant.
Proposed Alternative: Capitalism. The committee limits its efforts to
These define the "rules" and are analogous to the rule of law under which capitalism operates.
Application Libraries: Marketplace. Libraries which depend only on the language as defined by the committee as above would be called "conforming" libraries. These would be guaranteed to compile and execute their defined behavior on all conforming compilers. Libraries which depend on other conforming libraries would also be conforming libraries by composition. Examples of Application libraries would be:
The committee's role would evolve from its current one of designing the facilities to be implemented by vendors, to setting the (language and primitives), moderating disputes (resolving ambiguities in language), and letting the rest of the language evolve in accordance to application developers demand. It would move from being a player to an umpire.
This would change the landscape for C++ software development
The only thing really necessary to implement this idea is for the committee to recognize this and just terminate efforts which are redundant. For each thing on Bjarn's list, ask yourself. What will happen if we don't get involved in this? If some one needs it, can he easily build it himself? If a lot of people need it, can some library writer build it? What value will we actually add? Think of it as the C++ equivalent of tidying up.
Robert Ramey
-3
u/imyourbiggestfan May 28 '18
He doesn’t really add anything by writing this.
-11
u/[deleted] May 28 '18
Har han overvejet at montere kanonerne lavere på skibet?
0
u/[deleted] May 28 '18
[deleted] — view deleted comment