{"id":904,"date":"2024-02-23T07:54:41","date_gmt":"2024-02-23T07:54:41","guid":{"rendered":"https:\/\/tbekk.com\/devstream\/?p=904"},"modified":"2024-02-23T07:54:41","modified_gmt":"2024-02-23T07:54:41","slug":"the-c-ecosystem-in-2023-growth-of-c20-wider-adoption-of-clang-based-tools-ai-gaining-developers-confidence","status":"publish","type":"post","link":"https:\/\/tbekk.com\/devstream\/2024\/02\/23\/the-c-ecosystem-in-2023-growth-of-c20-wider-adoption-of-clang-based-tools-ai-gaining-developers-confidence\/","title":{"rendered":"The C++ Ecosystem in 2023: Growth of C++20, Wider Adoption of Clang-based Tools, AI Gaining Developers\u2019 Confidence"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-text-color has-light-gray-color has-alpha-channel-opacity has-light-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em><strong>Link:<\/strong><\/em> <a href=\"https:\/\/blog.jetbrains.com\/clion\/2024\/01\/the-cpp-ecosystem-in-2023\/\"><em>JetBrains Blog<\/em><\/a><\/li>\n\n\n\n<li><em><strong>Author:<\/strong><\/em> <a href=\"https:\/\/blog.jetbrains.com\/author\/anastasia-kazakova\"><em><strong>Anastasia Kazakova<\/strong><\/em><\/a><\/li>\n\n\n\n<li><em><strong>Date:<\/strong><\/em> <em><strong>Jan 16, 2024<\/strong><\/em><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-light-gray-color has-alpha-channel-opacity has-light-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<p>Every year, JetBrains runs the Developer Ecosystem Survey to capture the landscape of the developer community, and this year\u2019s results are finally in! One of the biggest trends of 2023 is AI usage gaining wider acceptance among software developers, with a whopping 77% of them using ChatGPT for various work-related tasks! In terms of programming languages, Objective-C is on its last legs, Rust set a new popularity record this year, and C++ and C are eighth and tenth, respectively, in the list of top languages. There are many more insights to be found in our report, so let\u2019s dive in!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/Blog-Space-1280x600-2x.png\" alt=\"Dec Eco for C++\"\/><\/figure>\n\n\n\n<p>In 2023, we collected 34,493 responses from software developers worldwide. Among them, 2,627 indicated C++ as one of their top three primary languages. We scrutinized the raw data to extract valuable insights and share them with you. We also asked several community members to chime in with their comments, including renowned experts representing the language committee and companies that play a significant role in the evolution of C++. We are grateful to them for their thoughts on our data and findings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/twitter.com\/Inbal_l\" target=\"_blank\" rel=\"noreferrer noopener\">Inbal Levi<\/a>, Lead Software Engineer at MPGC Services Ltd (Millennium), WG21 committee member<\/li>\n\n\n\n<li><a href=\"https:\/\/twitter.com\/blelbach\" target=\"_blank\" rel=\"noreferrer noopener\">Bryce Adelstein Lelbach<\/a>, Principal Architect at NVIDIA<\/li>\n\n\n\n<li><a href=\"https:\/\/twitter.com\/diegorlosada\" target=\"_blank\" rel=\"noreferrer noopener\">Diego Rodriguez-Losada&nbsp;<\/a><a href=\"https:\/\/twitter.com\/diegorlosada\" target=\"_blank\" rel=\"noreferrer noopener\">Gonzalez<\/a>, Lead Architect at JFrog, the team behind Conan<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/www.jetbrains.com\/lp\/devecosystem-2023\/cpp\/\" target=\"_blank\" rel=\"noreferrer noopener\">CHECK C++ REPORT<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cpp_standard_cpp_as_the_base_dialect\">C++ standard: C++20 as the base dialect<\/h2>\n\n\n\n<p>The downside trends for C++11 and C++14 continue, and C++17 demonstrates only tiny growth as people migrate to C++20 and C++23. Next year, we could realistically see the combined share of C++20 and C++23 surpassing that of C++17. Part of the driving force behind this is that C++ conferences have been tending to favor talks about C++20 and C++23.<br><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/standards_trends.png\" alt=\"C++ Standard trends\" width=\"1024\"><\/p>\n\n\n\n<p>It seems like the gamedev industry is ahead of the game in adopting newer C++ standards. This trend is likely to be amplified when the language adds reflection \u2013 one of the most-awaited language features for game developers in view of its high importance for object serialization algorithms. By the way, did you know that Unreal Engine emulates reflection via&nbsp;<a href=\"https:\/\/www.youtube.com\/watch?v=DIpDzQyCS5c\" target=\"_blank\" rel=\"noreferrer noopener\">macros<\/a>?<\/p>\n\n\n\n<p>We also looked back and compared the recent language standards on their shares of adoption in the first year of release vs. one year later:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C++17 started off with 12% in 2017 and reached 18% in 2018.<\/li>\n\n\n\n<li>C++20 started off with 12% in 2020 and reached 18% in 2021.<\/li>\n\n\n\n<li>C++23 started off with 10% this year, so now all bets are on what share it will reach in 2024.<\/li>\n<\/ul>\n\n\n\n<p>The share of those who don\u2019t plan to migrate to the newer standards hovers around 50%, with the highest figure (57%) coming from those who still use C++98\/C++03. This phenomenon is not new and has a lot to do with the need to use old compiler versions, especially in some embedded projects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"beyond_cpp\">Beyond C++<\/h2>\n\n\n\n<p>Fun fact: Last year, I managed to surprise&nbsp;<a href=\"https:\/\/www.youtube.com\/channel\/UCxHAlbZQNFU2LgEtiqd2Maw\" target=\"_blank\" rel=\"noreferrer noopener\">Jason Turner<\/a>&nbsp;by revealing that Python is the number one companion to C++ developers after C++ itself. In 2023, Python is still there with a clear lead over C:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/top_languages.png\" alt=\"Languages with C++\"\/><\/figure>\n\n\n\n<p>In my C++ development experience, Python was also widely used for wrapping the project model, and I know many game development studios that still process their&nbsp;<em>.sln<\/em>&nbsp;files with Python.<\/p>\n\n\n\n<p>As for Rust, there is an interesting question we\u2019re now looking into with the&nbsp;<a href=\"https:\/\/www.jetbrains.com\/rust\/\" target=\"_blank\" rel=\"noreferrer noopener\">JetBrains RustRover<\/a>&nbsp;team. We\u2019d love to know how many Rust projects are currently utilizing C++ and vice versa. Most surveys and GitHub scans indicate no more than 5%\u201310%, even though big companies like Google are known to be migrating parts of their huge code bases to Rust for security and safety reasons. What\u2019s your take on that?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cpp_tooling_the_major_players_remain_unchanged\">C++ tooling: The major players remain unchanged<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"cpp_ides_and_editors_of_choice\">C++ IDEs and editors of choice<\/h3>\n\n\n\n<p>Most C++ developers seem to be sticking with the same few IDEs and editors:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/editor.png\" alt=\"C++ editor\"\/><\/figure>\n\n\n\n<p>In terms of full-featured IDEs, CLion and Visual Studio occupy comparable positions on the market, with Visual Studio Code rivaling them as a smart editor. We are happy to be part of this competition to evolve and deliver the best experience to our users. (By the way, did you know Android Studio uses CLion\u2019s C++ support? It builds a proprietary component on top of our source code.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"managing_third_party_libraries\">Managing third-party libraries<\/h3>\n\n\n\n<p>Managing third-party libraries is one of the biggest challenges in C++, even after 35 years of its existence. In the&nbsp;<a href=\"https:\/\/isocpp.org\/files\/papers\/CppDevSurvey-2023-summary.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">C++ Foundation Annual C++ Developer Survey \u201cLite\u201d<\/a>, this peeve took first place and was named a \u201cmajor pain point\u201d by 47% of the respondents. This comes from the fact that C++ libraries are difficult to define, and using them in a pre-built form is tricky. But there is hope yet! At CppCon 2023, CMake\u2019s Bill Hoffman and Bloomberg\u2019s Bret Brown talked about the initial standard for dependency management in C++ \u2013 metadata files to describe pre-built libraries. Their talk&nbsp;<a href=\"https:\/\/www.youtube.com\/watch?v=IwuBZpLUq8Q\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Libraries: A First Step Toward Standard C++ Dependency Management<\/em><\/a>&nbsp;is already available on YouTube.<\/p>\n\n\n\n<p>Per the Developer Ecosystem Survey 2023, we see fewer people building libraries from sources:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/packages.png\" alt=\"Package management C++\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"project_models_and_build_systems\">Project models and build systems<\/h3>\n\n\n\n<p>CMake stays at the top (despite a slight drop since last year) while msbuild and Makefiles keep losing ground:<br><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/project_models.png\" alt=\"Project models\" width=\"949\"><\/p>\n\n\n\n<p>As Bryce has spotted, Ninja is growing. The data from&nbsp;<a href=\"https:\/\/isocpp.org\/files\/papers\/CppDevSurvey-2023-summary.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">C++ Foundation Annual C++ Developer Survey \u201cLite\u201d<\/a>&nbsp;shows even larger gains:<\/p>\n\n\n\n<p><img decoding=\"async\" width=\"1000\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/project_models_all.png\" alt=\"Audiences for C++ surveys\"><br>This might be explained by the fact that the C++ Foundation survey offers respondents to \u201ccheck all options that apply\u201d more often. It also asks more questions focusing specifically on build tools, and some of the respondents who select Ninja must be using it as a build tool rather than a project model.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"safe_and_clean_cpp_code\">Safe and clean C++ code<\/h2>\n\n\n\n<p>Code analysis tools help us write safe and clean C++ code. Which ones are the most popular in the community?<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/code_analysis.png\" alt=\"Tools for code analysis\"\/><\/figure>\n\n\n\n<p>It\u2019s no wonder that Clang-based tooling is growing in popularity.<\/p>\n\n\n\n<p>The share of those who don\u2019t use code analysis at all stays around the same level, 30%, while the share of those using code analysis bundled into their IDE has dropped. What could be the reason?<\/p>\n\n\n\n<p>CI pipelines might be part of the reason. However, looking at code analysis integrated into CI\/CD pipelines, we see only a very modest growth from 26% to 27%:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/running_code_analysis.png\" alt=\"Running code analysis\"\/><\/figure>\n\n\n\n<p>Per our survey data, half of the respondents run code analysis at the compilation stage. This is a missed opportunity, because running static code analysis in a \u201cwrite code, detect error, fix error\u201d loop has been shown to lead to significant time savings. And the tools these days can achieve some fantastic results! For example, the latest data flow analysis in CLion is capable of catching dead code, null pointer dereferences, memory leaks, dangling pointers, and array index issues. Read our blog post series to learn more:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/blog.jetbrains.com\/clion\/2023\/11\/striving-for-better-cpp-code-part-i-data-flow-analysis-basics\/\">Striving For Better C++ Code, Part I: Data Flow Analysis Basics<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/blog.jetbrains.com\/clion\/2023\/12\/striving-for-better-cpp-code-part-ii-function-summaries-to-speed-up-the-data-flow-analysis\/\">Striving For Better C++ Code, Part II: Function Summaries to Speed Up the Data Flow Analysis<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ai_is_already_here\">AI is already here!<\/h2>\n\n\n\n<p>2023 was the first year we asked&nbsp;<a href=\"https:\/\/www.jetbrains.com\/lp\/devecosystem-2023\/ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">questions about AI<\/a>&nbsp;in the Developer Ecosystem Survey. We were very curious to find out how many developers are already adopting AI in their work and which tasks and functions they\u2019re delegating to it. The key facts we discovered are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>84% of developers are familiar with generative AI tools in one way or another.<\/li>\n\n\n\n<li>43% of developers are planning to try AI tools in the near future. The biggest concern is, obviously, security, as reported by 20% of respondents.<\/li>\n\n\n\n<li>Most often, developers are using AI to learn new things, brainstorm ideas, and summarize content.<\/li>\n<\/ul>\n\n\n\n<p>Among their most time-consuming activities, developers name writing code (first place with 79%) and understanding code (second place with 47%). With the rapid evolution of AI, it\u2019s no wonder it can already help developers with both of these tasks.<\/p>\n\n\n\n<p><em>JetBrains AI Assistant is now generally available with a number of new and improved features to increase your productivity in JetBrains IDEs.<\/em>&nbsp;<em>In CLion,&nbsp;<\/em><a href=\"https:\/\/www.jetbrains.com\/help\/clion\/2023.3\/ai-assistant.html\" target=\"_blank\" rel=\"noreferrer noopener\"><em>AI Assistant<\/em><\/a><em>&nbsp;is always on standby to explain&nbsp;<\/em><em>code, as well as CMake and runtime errors<\/em><em>; suggest refactorings; generate documentation and commit messages; and answer questions in a context-aware AI chat. Project-aware AI actions are also available to provide more comprehensive results using extended context.<\/em><em>&nbsp;Use AI Assistant in CLion as an add-on with a&nbsp;<\/em><a href=\"http:\/\/www.jetbrains.com\/ai\" target=\"_blank\" rel=\"noreferrer noopener\"><em>JetBrains AI Service<\/em><\/a><em>&nbsp;subscription.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"about_the_audience_and_the_survey_methodology\">About the audience and the survey methodology<\/h2>\n\n\n\n<p>If you compare the C++ findings in the JetBrains Developer Ecosystem survey with those in&nbsp;<a href=\"https:\/\/isocpp.org\/files\/papers\/CppDevSurvey-2023-summary.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">C++ Foundation Annual C++ Developer Survey \u201cLite\u201d<\/a>, you\u2019ll likely spot similar trends in many areas, but also some significant differences. One important fact that needs to be kept in mind is that the audience of the C++ Foundation survey, on average, has much more experience in C++:<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/audience_comparison.png\" alt=\"Compare audiences\" width=\"843\"><br>JetBrains researchers do their best every year to collect the most diverse data, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Attracting respondents with varying amounts of experience, from students to professional developers.<\/li>\n\n\n\n<li>Making the survey accessible in more world regions by translating it into 10 languages.<\/li>\n\n\n\n<li>Ensuring geographical diversity by collecting sufficiently large samples from 17 countries.<\/li>\n<\/ul>\n\n\n\n<p>You can learn about our methodology in the&nbsp;<a href=\"https:\/\/www.jetbrains.com\/lp\/devecosystem-2023\/methodology\/\" target=\"_blank\" rel=\"noreferrer noopener\">dedicated section of the survey<\/a>. In addition, we will soon publish the anonymized raw data from the survey so that anyone interested will be able to verify the report or build their own slices from it.<\/p>\n\n\n\n<p>Finally, if you run similar surveys or would like to start collecting data from the community, you may want to watch to my talk from CppCon 2023,&nbsp;<a href=\"https:\/\/www.youtube.com\/watch?v=54LiB_OxPHE\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Surveying the Community: What Could Possibly Go Wrong?<\/em><\/a>&nbsp;In this talk, I dive into the aspects of survey methodology, including how to remove branding, targeting, and sampling biases, and explore how a properly asked question can change the data in our C++ reality.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.jetbrains.com\/lp\/devecosystem-2023\/cpp\/\" target=\"_blank\" rel=\"noreferrer noopener\">CHECK C++ REPORT<\/a><\/p>\n\n\n\n<p>Do you have questions about the data we\u2019ve discussed here or comments on the latest C++ community trends? If so, please share them in the comments! We\u2019re always happy to hear what you think!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every year, JetBrains runs the Developer Ecosystem Survey to capture the landscape of the developer community, and this year\u2019s results are finally in! One of the biggest trends of 2023&#8230; <a class=\"read-more-link\" href=\"https:\/\/tbekk.com\/devstream\/2024\/02\/23\/the-c-ecosystem-in-2023-growth-of-c20-wider-adoption-of-clang-based-tools-ai-gaining-developers-confidence\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,220,10],"tags":[334,335,86,227],"class_list":["post-904","post","type-post","status-publish","format-standard","hentry","category-article","category-cpp","category-development","tag-c11","tag-c14","tag-c20","tag-c23"],"_links":{"self":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts\/904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/comments?post=904"}],"version-history":[{"count":1,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts\/904\/revisions"}],"predecessor-version":[{"id":905,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts\/904\/revisions\/905"}],"wp:attachment":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/media?parent=904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/categories?post=904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/tags?post=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}