122 points · by g1236627 · 11y ago · 82 comments
Concepts: http://en.wikipedia.org/wiki/Concepts_%28C%2B%2B%29
Modules: http://clang.llvm.org/docs/Modules.html
Coroutines: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n370...
operator. (for proxies): http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n417...
Uniform call syntax: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n417...
Source code (implemented with a lot of help from C macros): https://github.com/snaewe/typeswitch
http://lambda-the-ultimate.org/node/3518 (voted off) http://lambda-the-ultimate.org/node/4450 (suggestions for future work)
Indiana— concepts are records of signatures; checking is done "by signature"; an arbitrary mapping (adapter) can be defined. Notable authors: Doug Gregor, Jeremy Siek, Jaakko Jarvi, a lot of others I'm insulting by forgetting.
Texas— concepts are predicates of "actions" (usage of signatures; expressions). Notable authors: Bjarne Stroustrup, Gaby Dos Reis; later, Andy Sutton.
The crux of the issue is that Doug Gregor actually implemented the Indiana proposal (twice?) and Gaby never implemented the Texas proposal. By 2009, the Indiana proposal was well on track to being accepted; then ... it wasn't.
Fast forward 5 years, and now we've got a re-imagining of the Texas proposal, with no serious dissent, as all the Indiana folks moved on (out of exasperation, frustration; age; interest, whatever).
He's also mentioned the Indiana proposal led to increased compile times (as in at least 100% slower) and that the Committee came up with a ridiculous number of concepts for the standard library, which suggested they were looking at things wrong. For instance, there's little value in having CanCompareForEquality, CanCompareForInequality, HasLessThan, HasGreaterThan, HasLessThanOrEqual, and HasGreaterThanOrEqual be separate concepts; they should be grouped into, say, HasTotalOrdering, EqualityComparable, and HasPartialOrdering. The current STL gets this wrong, it wants a concept of HasPartialOrdering but it actually requires HasLessThan (and fakes equality comparison by assuming if a is not less than b and b is not less than a, then a and b must be equal). I don't fault Stepanov for this mistake, it's not obvious and it's relatively easy to tell people "just implement operator< for your types and we'll be able to sort them when needed" instead of "implement the relational operators that make sense; some implementations may use operator< to sort, while others may use operator>, and others operators < and <=, and yet others operators <, !=, and ==, etc."
Here's numbers for the ones you listed:
Concepts: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n436...
Modules: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n446...
Coroutines: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n439... & http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n439.... Also http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n413...
operator dot: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n447...
Uniform call syntax: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n447...
Here are some others that Stroustrup listed. I think they're probably important proposals. I imagine Stroustrup has at least some priority order in his list.
Ranges: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n438...
Comparisons: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n447... & http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n447...
array_view: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2015/n434...
I only ever remember hearing of one programming language supporting it, and I can't even remember what it is. Maybe it was Nim?
C++ should do something to address binary interoperability and ABI issues.
This would be hard, as some of this lies outside the scope of language designers and specifications. The ball largely rests with compiler and platform developers.
But there are things that could be done.
A common pattern to make C++ libraries usable from languages like Java, Swift, Ruby, Python, etc. without encountering DLL hell issues or language impedance mismatch is to "downgrade" the C++ API into a "--" plain C API. This is done by providing plain C wrappers.
Perhaps something could be done to either ease this process or make it unnecessary.
Another possibility would be to do something to lean on platforms to address the issues around this. Sometimes languages with as much center of gravity as C++ can do this.
Concepts alone is looking like a very complex feature. And I was and under the impression that modules were even less ready. But both are very much needed.
I do know that the committee is planning on putting more experimental library features in the experimental namespace, which should provide a nice middle ground between "not ready for standardization" and "standardized and set in stone".
I believe all of the library work for concepts will be released such a namespace in C++17.
To me it feels as if c++17 is just making the compiler more aware of them, and as a result likely produce better error messages (and the code to write them to be more pleasant).
I understand that that's pretty much outside of the scope of the language designers, but I've been playing with rust lately and it's so refreshing to actually get help from the compiler, rather than just looking for the line where it failed and trying to figure out what's wrong on my own.
So, let's say that C++17 does come out in 2017. It will probably be the case that some of the features will be ready to use in GCC and Clang right away, and around 2019 or so they should have full or nearly full support. 2021 for Intel. 2023 for Microsoft.
So that gives you a range of answers. Depending on which features and which compiler, you could start using some of them immediately (or even before 2017, many of the features are implemented experimentally in advance), but if you want full support across the range of commonly used compilers, you're probably going to be waiting until the early to mid 2020s.
"First, let’s look at the C++11 language features. Clang 3.3 and above, and GCC 4.8 and later have complete support, so there was no point including them in the table."
Also note that, on the C++14 front, clang supported all language features and most library features. And that is a year ago.
this is the latest i could find, maybe time for an update if so.
You can use Clang in C++1z mode with the -std=c++1z option.
I think what people want is something like go, where you add a single line to your code and it magically downloads and compiles the referenced library. C++ doesn't have anything like that (and I doubt it ever will to be honest).
Not like Go. It needs to solve versioning.
* It only works in Linux, not Windows or Mac OS X.
* You need additional work to have it work in more distributions
* Linux package file formats are not distribution neutral, there's no "package.json" which is understood by every package manager
I think C++ needs an OS neutral package management system.
In practice, this hasn't been a problem for my C++ projects for years, except on OS X where there have been too many changes in a couple of years (gcc -> gcc-llvm -> clang, libstdc++ -> libc++).
Trying to program C++ in windows is an horrible experience that I wont wish on my worst enemy.
Linux is nice, but it doesn't have after effects, support for the latest ultrabooks, photoshop ( sorry GIMP is a joke ).
Linux also contantly breaks whenever I tried using it, sound, video ?
Also gaming.
Anyway the browser environment is cool because it forced everyone to stick to a single standard.
( Also corporate uses windows, sadly. Working with tools created by major corporations in my industry is on windows )
As an amateur, I've found kdenlive and audacity provide decent video and audio editing on Linux. Professionals use Mac.
Typically installing Linux from scratch has involved less fiddling with drivers than installing windows from scratch on an empty laptop for a while now.
If you want a laptop with Linux support out of the box, you can pay for that and it will just work (e.g. http://www.dell.com/us/business/p/xps-13-linux/pd or http://www.dell.com/us/business/p/laptops.aspx?c=us&cs=04&l=...)
Gaming is a fair point, but even that might be changing with Valves efforts.
I use Windows, Mac and Linux each, they all have their advantages, but for serious software development Linux is ahead of MacOsX and both are way ahead of Windows.
Here's the thing - if you can't make linux work for you at this point in time then you really have no business being in technology, at all.
* I'm being very generous here.
In Ruby, for example, Bundler is what I would call a project manager. It installs packages to a place only it knows (or it should know) about, and Bundler or tools that integrate with Bundler wrangle the Gem loader path to control what modules are available to load.
This way the dependencies of any number of project live in complete isolation from one another, including several different versions of the same dependency which is often impossible to achieve using a system package manager like apt or pacman. The end result is similar to something like virtualenv, but with (in my opinion) a friendlier user experience.
These project managers also often include project scaffolding tools and subcommands to run tests, generate documentation, etc. Examples in other languages include Leiningen or Boot for Clojure, Maven for Java, and Cargo[1] for Rust. When used properly and when the creators of a project manager understand its role, they can work in concert with a system-level package manager. Cargo, for example, interoperates beautifully with system packages with great support for linking with system libraries[2].
[1]: http://crates.io/
[2]: http://doc.crates.io/build-script.html#case-study:-linking-t...
You can do additional work to pre-build wheels or packages, but then you're stepping outside of the python and pip world and into maintaining your own repos and build servers and...
npm would be a much better example, however not perfect as well. Actually, I would say all package managers we have are quite imperfect, but it's more of a existing implementations problem, not a package manager problem in general.
I mean, yeah, it would be nice if we all just started using guix or something, and wouldn't need language-specific package managers anymore, but it's not happening yet, right? And we have to live somehow until it does. And if I need to use language-specific package manager to be able to install a library that has a new version with crucial fixes on github since yesterday, and the version apt-get suggests is two years old — well, I'd better be using language-specific package manager. Still better than compiling it manually collecting dependencies all over the world over the next few hours.
Each one can work well in isolation; but when you then need to integrate with your platform package manager or another language's package manager, you get a combinatorial explosion of possible interactions.
One example that I've been particularly frustrated by recently is Python/Emacs integration. I have Emacs and Python installed via my system package manager (apt). Then there are a bunch of Emacs modes that I need to install via the Emacs package manager (elpy and its dependencies). Those in turn have dependencies on Python packages (rope/flake8). And finally I have a bunch of different python packages that I work on that are all linked to from a virtualenv so that they'll all resolve properly in all of those tools.
If I upgrade one part of that system (apt, emacs packages, python packages), it frequently breaks other parts, because there aren't any proper dependencies between them. I then have to spend a while fiddling with the whole setup to get it back up and running again.
Basically, the more package managers you have, the less value they have. The whole point of package managers is to manage a whole set of packages together, so you don't have to manually go through and resolve all of the dependencies yourself, manually figure out which version of this package goes with what version of that package. But every time there is some dependency between two different package managers, that breaks down.
Another part of the frustration is that they are all basically doing the same thing, but with slightly different implementations. In the end, a package manager's purpose is to let you figure out which packages you need, by resolving dependencies while honoring version constraints, fetch those packages from an archive somewhere (and verify that they are intact and haven't been tampered with), unpack them and install the files in the right places, and run some glue code to set up indexes, documentation, and so on appropriately. The only part of that task which really needs to differ between package managers is that glue code, plus the policies for inclusion in the centralized archive; everything else is basically solving the same problem in a whole bunch of slightly different ways (different ways of representing and comparing version numbers, different ways of verifying package integrity, different ways of doing local mirrors, etc), and so you get a whole bunch of incompatible and differently buggy implementations of the same kinds of things, or some functionality just missing from certain package managers.
What I would really like to see is a single unified package manager core, that handles all of the basic functionality that they all set out to solve, with the ability to utilize multiple different repositories (so that different projects could have their own policies for inclusion and sets of packages that are designed to work together), and appropriate places to hook in all of the language (or distro) specific glue that you need. I've been mulling over trying to write such a package manager, but of course when doing so you need to be careful or you will run into this problem: https://xkcd.com/927/
Cross-platform C++ package management using CMake only.
Not just languages - WordPress, MediaWiki ...
If you're very lucky it won't clash horribly with apt and yum. So you probably won't be lucky.