A survey of C++ developers reveals significant resistance to and mistrust of AI tools, contrasting sharply with the wider developer community's adoption rates. This article delves into their usage patterns, blocking factors, and perceived productivity impacts.
A survey conducted by the Standard C++ Foundation involving 1,434 C++ developers highlighted a highly experienced and dedicated user base. 87.5% use C++ at work, and a significant 60% possess over 10 years of experience, with the largest group (33%) having more than 20 years. Their professional and personal projects are heavily focused on areas like Developer Tools and Hardware/IoT.
Unlike broader developer trends, C++ developers show a strong aversion to using AI tools for various coding tasks. A substantial proportion reported 'Never' using AI for activities such as writing, understanding, debugging, identifying performance issues, code review, refactoring, learning concepts, or writing documentation. The number of 'Nevers' for these tasks ranged from 467 to 754 respondents.
For those C++ developers who do engage with AI, GitHub Co-pilot emerged as the most popular code-specific tool, used by 53% of respondents. Among non-code-specific AI tools, ChatGPT was also used by 53%, followed by Claude Code (44%) and Google Gemini (39%). Notably, approximately a quarter of the total respondents avoided AI tools completely.
The survey revealed a higher level of mistrust among C++ developers regarding AI tools compared to the general developer community. Key factors deterring adoption include unreliable output, hallucinated APIs, the introduction of subtle bugs, excessive time required for review, poor understanding of C++/systems by AI, and context limitations, leading to what some called 'AI-generated coworker/OSS slop'.
An AI-generated summary of open-ended responses indicated that AI's primary utility for C++ developers lies in faster information retrieval, serving as an alternative to search engines for APIs, libraries, and documentation. It's also found useful for generating repetitive code elements like wrappers and small functions. However, a significant minority reported no meaningful productivity gain, or even a net loss, due to the aforementioned issues requiring extensive human oversight.
The article concludes that the most effective approach to using AI tools is the 'AI drafts, human reviews' model. Achieving productivity gains necessitates strong human expertise, precise prompts, existing tests, leveraging compiler and static-analysis feedback, and thorough line-by-line review. This cautious approach by C++ developers is presented as a valuable example for the wider developer community.