C++ is broken
C++ as a language is a tool for developers to productively deliver software. Language evolution is NOT the end objective in the real world.
The whole C++ ecosystem from committee to all of the conference backslapping and training is broken in this respect. It's focus is off.
Instead of 'boost' we need 'boosted' to help define, review and encourage that wider ecosystem so developers can be productive.
It's ok to define things that aren't infinitely flexible, and infinitely extensible but get the job done.
It's OK and, in some ways better, to provide an opinionated library outside the standards rather than deliver an intellectually burdened, extensible interface two years later than needed.
All the helpful features in the core language and core libraries are MEANT to enable a much wider ecosystem to make the tool that is C++ more productive.
But we aren't getting a wider ecosystem, we are just getting a language where we are apparently 'not paying for' a huge intellectual burden.
I want to say at this point that intellectually I am constantly impressed by the committee's work and standards BUT ...
The payoff just isn't happening. Even within the standards committee more time is being spent in intellectually stimulating but largely pointless activities because the tool and productivity benefits aren't happening.
Look at how the wider productive ecosystem hasn't flourished since C++ 11.
I know many excellent libraries have been made, but think about your next large project and how much is coming from a mixed bag of variable quality 3rd party libs to plug basic capabilities.
The committee work is spread so thin that core building blocks get pushed out further in time and so can't be built upon by library authors.
Networking, executors, any form of I/O - slipping again.
Lots of hard work being done but by far too few people in their spare time.
Seems a very dysfunctional way to move the monolith forward.
'You don't pay for what you don't use' is laudable up to a point, but the 'don't use' because you don't actually have, say, a basic network library is more of a reality.
That basic network lib and executor model I've been impatiently waiting for should probably not be part of the core standards remit (architectural concepts and keyword support for executors would probably be necessary, but not much else.)
If we had the metaclass generation as proposed, I'd hope even more of these items would then be able to fall outside the standards.
42
u/krapht Jul 21 '19
TL;DR: OP wants a BDFL to ship a high-quality, batteries included standard library.
OP, you'll never get your wish. Too many people use C++ for high-perf code where people want to understand and specify exactly how their code gets compiled down to machine instructions. These machines also may be weird embedded systems lacking all sorts of capabilities you'd expect from a modern CPU. This means any standard library implementation has to satisfy a gajillion stakeholders and use-cases.
No offense, but if you want high-level libraries with "it-just-works" semantics and reasonably high performance, maybe try C#? You can stack allocate most objects if you need performance, it runs on both Linux and Windows, and it has a huge ecosystem of libraries.
10
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19
What's BDFL?
6
u/afiefh Jul 21 '19
Benevolent dictator for life. https://en.m.wikipedia.org/wiki/Benevolent_dictator_for_life
5
4
u/DubioserKerl Jul 21 '19
Google tells me it is the "Bund deutscher Fußball Lehrer" (German Soccer coaches association) ... 🤔
5
u/JuanAG Jul 21 '19
I dont think he wants a dictator ruling the language, i think he wants what many of us dream about and many other competitors has, i like coding and i enjoy doing in Java, in C++ it is hard to do as it is not the code, it is the code and all the ecosystem around you and because it is from the 80s is the experience you get, far from a good one, back in the day may be fine but since i has tried better things i want them
-4
u/mintyc Jul 21 '19
I guess that's the point. I want java's ecosystem but in a C++ system. I still love C++
This was a goal stated for C++ 10 years ago when C# emerged and Java was also already more productive for most application development.
11
u/Drugbird Jul 21 '19 edited Jul 21 '19
So are you arguing for our against the use of third party libraries? You seem to be for in one paragraph, and against in another.
2
u/mintyc Jul 21 '19
C++ needs them. Standards committees principles means that it cannot deliver the length and breadth required.
Limited standards resource should be focused more tightly.
It has the power to encourage and guide the ecosystem but doesn't have the resource or maybe even the mindset to implement.
Halve the scope of the standards work, but encourage 10x ecosystem development
8
u/Drugbird Jul 21 '19
I'm sorry, but i have a very hard time understanding what you're saying exactly?
How does the standards committee encourage (or not) third party library development?
2
u/mintyc Jul 21 '19
It should encourage but not 'do'.
Lots of proposals consume evaluation effort. Some make it further.
5
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19
By focusing on making it significantly easier to use third party libraries. Modules goes a long way towards this, by giving us better code encapsulation.
1
2
u/jwakely libstdc++ tamer, LWG chair Jul 23 '19
I wholeheartedly agree with this.
We (the standards committee) have invited people to make proposals, and people are doing so in larger numbers than ever before. Not all of it is really what we should be standardising IMO, and there should be more focus on what's essential. I wish the response to more library proposals was "this is great, but it doesn't need to be in the standard - go away and make it successful on github".
19
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19
The committee is practical, not "intellectual".
Have you ever been to a committee meeting? If not, then perhaps you should attend one to see how things actually work.
6
u/JuanAG Jul 21 '19
I will want to attend to one but i am afraid of going and voting, i am not a guru so my vote, even if it is needed for quorum i wouldnt feel good about it because i will be voting based on what others do not on what i think is the best
And i always defend the hard work of the ISO and people like you that keep us to date of what´s going on, the problem is not lack of hard work, i guess it is a focus one, instead of dealing with so extreme cases it should be better to improve the foundations. I dont know how to solve it but the overall results are not fulfilling if you compare to other recent rivals
10
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19
Being a guru isn't a requirement for participation. My point was more that the author might have a different perspective if he saw how we actually work.
0
Jul 21 '19
[deleted]
1
u/bstamour WG21 | Library Working Group Jul 23 '19
You can attend and abstain from voting in the straw polls.
2
Jul 22 '19
The committee is practical, not "intellectual"
Well, when I look at examples how std::variant is supposed to be used, I have to slightly disagree...
-8
u/mintyc Jul 21 '19 edited Jul 21 '19
I don't need to attend. You have a proven and excellent track record at the building blocks level. I trust you.
I know you wrestle with the wider issues constantly. Should this feature be considered, rejected etc.
I look at the outcome and for every great building block or strategic change requiring standards support e.g ranges, modules, you have struggled to deliver the goals stated 10 years ago for a wider ecosystem, productive tool.
Time to recognise that less is more in the standards work.
6
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19
Time to recognise that less is more in the standards work
I agree. I'm solidly in the "batteries not included" camp. Not everyone is, though - some believe that a lot more features and a bigger standard library is necessary for C++ to remain competitive.
3
u/CODESIGN2 Jul 21 '19
Language evolution is NOT the end objective in the real world.
end goals or AIMS are not objectives. AIMS & end-goals should be specific, measurable, actionable / assignable, relevant and time-based. Objectives help you get to end goals, but generally represent a unit of work towards an end goal or aim.
How can you be complaining about language whilst using incorrect words?
It's ok to define things that aren't infinitely flexible, and infinitely extensible but get the job done.
Agreed. Kate Gregory talks about this in some of her more accessible pluralsight courses. Also Kate has done a number of YouTube talks covering this.
It's OK and, in some ways better, to provide an opinionated library outside the standards rather than deliver an intellectually burdened, extensible interface two years later than needed.
If I squint a bit this might be okay for a business. Not a standard or framework.
Of course you can cast everything using (void *) if you're working on some internal noise project. Doesn't mean training should push that as a good way to code.
All the helpful features in the core language and core libraries are MEANT to enable a much wider ecosystem to make the tool that is C++ more productive.
What does this mean. Do you have examples of when core libraries restrict ecosystem and make C++ less productive?
But we aren't getting a wider ecosystem, we are just getting a language where we are apparently 'not paying for' a huge intellectual burden.
All programming languages suffer this to an extent. Some of the newer languages have enterprise support from Giants like Google & Mozilla, but ultimately, all are under-funded. C++ further suffers from not having too many giants supporting a freely available compiler, and many compilers having differences which make inter-compiler compatibility a burden. There are additional costs to even get started with C++
Look at how the wider productive ecosystem hasn't flourished since C++ 11.
I know many excellent libraries have been made, but think about your next large project and how much is coming from a mixed bag of variable quality 3rd party libs to plug basic capabilities.
The committee work is spread so thin that core building blocks get pushed out further in time and so can't be built upon by library authors.
Networking, executors, any form of I/O - slipping again.
Lots of hard work being done but by far too few people in their spare time.
Seems a very dysfunctional way to move the monolith forward.
'You don't pay for what you don't use' is laudable up to a point, but the 'don't use' because you don't actually have, say, a basic network library is more of a reality.
Hmm... IDK it is easier for application languages to make lots of decisions up-front about this sort of thing. For example non-blocking as a default, or hashmaps called arrays because the mental model is contiguous. C++ largest challenge as I can see here is C and legacy C++ compatibility.
My point is that whilst language sugar and features may be available in a lot of other places; choice and robust open design are not.
It would be nice to have an official C++ compiler, linter, formatter, interactive debugger (pdb + pdb++ is great IMO), documentation standard and a larger standard library, but without finding millions of dollars to fund it; I don't expect it will fall from the sky at any point soon. Worse still, implementations of C++ for embedded platforms and non-x86 hardware will continue to have warts
1
u/mintyc Jul 21 '19 edited Jul 21 '19
What does this mean. Do you have examples of when core libraries restrict ecosystem and make C++ less productive?
Not being a 'positive' change isn't the same as being a 'negative' one.
1
u/CODESIGN2 Jul 21 '19 edited Jul 21 '19
If changes are not discernibly negative or positive to you, they are probably positive to someone, even if it's not you
8
u/Lectem Jul 21 '19
I've been saying for a long time now that we mostly don't need new shiny library features but more core features. Most people couldn't care less about 2d, ranges, asio, audio if we had a good standard package description and compilation model. They would just use a 3rd party. The std for me should not be a big framework or try to standardize stuff that is sometimes not even yet a standard in domains not related to the language itself. (see all the fuss the 2d proposal made) Less new fancy stuff that do not solve actual problems (if there are easy to install 3rd party, it is not a problem).
It seems modules are partly going in the right direction at least on this point, it will make us have a more modern and decent compilation model.
4
15
u/JuanAG Jul 21 '19
Uff, brace your self, this type of opinions are not very popular here even it they contain part of the truth or reality
I will say it is half broken if you compare to modern products, it needs a updgrade and soon, the good part is that is optional, using C++ is not mandatory, you can choose any other language you want
2
u/khleedril Jul 21 '19 edited Jul 21 '19
Wouldn't all this go away if library header files were stored in the library container itself (.a, .so, or whatever), and the compiler only needed a -lthirdpartylib flag to get everything needed without version incompatibility problems or other infrastructure dependency?
1
u/sebamestre Jul 21 '19
I don't think stating dependencies in compiler flags is the right way to go about this.
If anything, they should be in the source files, or in a separate dependency description file, and the linking should be done automatically.
3
u/Dean_Roddey Jul 21 '19 edited Jul 21 '19
Of course I've been saying similar things for a long time, though it's a little ambiguous exactly what you are saying I think. I certainly believe, if this is what you mean, that way too much time has been spent on stuff like containers, much of which anyone can trivially do if when they need to, and not enough time on stuff that real applications need these days which aren't trivially doable. I also think a huge amount of time has been spent pushing premature optimization all the way up into the language design process, and trying to serve too many masters (which I think is one thing that you are clearly saying.)
I've put my money where my mouth is and created a system that puts the emphasis where I think it should be, i.e. less on creating an operating system in a single templatized header that uses zero CPU and runs at compile time, and more on providing the type of functionality that is needed to do the kinds of programs that C++ is intended for (other than embedded) without having to just throw a bunch of bits and pieces together, and maintaining readability by avoiding massive templatization, using them only where they really required.
https://github.com/DeanRoddey/CIDLib
My argument would be for a 'RISL', a Reduced Instruction Set Language, that provides the core functionality without forcing any runtime libraries at all, allowing for the development of specialized library sets for specific needs, but within the context of the same language syntax.
Not sure why I bothered typing this, because your post will get down-voted into oblivion within minutes probably and no one will ever see this.
10
Jul 21 '19
Not sure why I bothered typing this, because your post will get down-voted into oblivion within minutes probably and no one will ever see this.
Rest assured, some of us ignore the downvotes on the post and see 80+ comments as a indicator of an interesting discussion. Too bad most redditors don't understand that they should upvote interesting content, even if they don't agree with it.
7
Jul 21 '19
like containers, much of which anyone can trivially do if when they need to
I would be very surprised to hear about a non-trivial application that doesn't use any containers. Since they are very useful, why shouldn't they be in the standard library?
I also think a huge amount of time has been spent pushing premature optimization all the way up into the language design process,
Not everyone thinks that having everything be a polymorphic class with runtime configuration for things that should be really decided at build time is a good idea.
without having to just throw a bunch of bits and pieces together
I'd rather combine multiple high-quality single purpose libraries to do the tasks that I need than having a single huuuuge monolithic library that does everything badly (or at the very least not as good as the single purpose libraries).
maintaining readability by avoiding massive templatization,
I don't know what exactly you have against templates, but they're pretty useful. Sure if you're doing a library you're probably going to need some template stuff that is a bit verbose at times but really, when you're writing code that uses them they're perfectly readable.
0
u/Dean_Roddey Jul 21 '19 edited Jul 21 '19
The fact that something is built to work as a system and shipped as such doesn't mean it's monolithic. That would require it be all in one giant library. My stuff is split up into many libraries. But they are all designed to work together from the ground up.
And it's a bit of a stretch to conclude that it's bad if it's not a standalone library. Ultimately the sum of the parts counts for a lot. When everything shares the same architectural features, the power you get from that, IMO, is a lot larger than anything you lose from the fact that every piece isn't the ultimate implementation. In fact the ultimate implementation, IMO, is sometimes not all that great because it's may be created with the problem domain in mind, not with the process of building systems in mind, and often including a lot of extra complexity that many to most applications won't need.
47
u/blelbach NVIDIA | ISO C++ Library Evolution Chair Jul 21 '19
So, I'm not really sure I understand your point, or what you think should be improved.
Can you give me a TL;DR/bullet points on what you think?