For those who is not aware in what epochality of this event: so it has developed that the mechanism of use of components in programs on With ++ was constructed somewhere about 35 years ago. It is impossible to call it convenient: if you want to create library — you need to make the heading file and to extend with it either code, or the compiled version of library. Thus there is array of problems:
- The heading file and library — separate files, one of them can be lost, or they can accidentally be desynchronized.
- The heading file joins in code the directive of preprocessor #include that first, slows down compilation, and secondly adds influence of everything that is written in heading files at each other and on final code. Cases when heading files need to be included in certain order are frequent or to define some macroes that the code has normally gathered.
As a result in infrastructure With ++ there are no concepts of "assemblies" or "packets" and, in difference from С# or Python where installation of components is trivial, in With ++ connection of each new library can bear the surprises. The offered mechanism of modules in With ++ is urged to clean this problem, to refuse the directive of preprocessor #include and to refer to components, as to some entity consisting of code and metadata, complete and easily connected. As a result we can soon receive essential acceleration of implementation of new components in the project, appearance of full-fledged managers of packets, installation of new library will be reduced to execution of one line or several cliques mouse. Whether this happiness!
Under cat there will be examples of use and the link to documentation.
Video of presentation meanwhile is not available on the channel of conference so that we have everything — some photos from the twitter and links to the offered draft of the standard of modules and its implementation in the Visual C ++ and Clang.
- The initial sentence of implementation of modules from Microsoft
- Discussion of the sentence of Microsoft
- Support of modules in Clang
This article is a translation of the original post at habrahabr.ru/post/267781/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: firstname.lastname@example.org.
We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.