Ask HN: Do you still enjoy coding in C++? 26 points · 32 comments TL;DR A text p...

@best

Ask HN: Do you still enjoy coding in C++? 26 points · 32 comments

TL;DR A text post asking HN readers whether they still enjoy writing C++, noting that C11 and later brought features like const-correctness, range-based for loops, smart pointers and powerful templates, while iterators, rvalue references and template error messages remain hard. The thread of about 30 comments is mostly mixed-to-positive: many commenters enjoy C for its power and control, with the main complaints being footguns, template complexity, long compile times and the cost of legacy code.

  • The poster enjoys modern C++ (C++11 onward) for strict types, const, range-based for loops, smart pointers and templates.
  • They acknowledge difficult areas: writing correct iterators, rvalue reference handling and reading template error messages.
  • The question asks whether readers enjoy or dislike writing C++ and why.
  • Several commenters say the answer depends on which C++ is meant: an old codebase, a template-heavy one, or a subset they choose.

Discussion The thread is a personal, reflective exchange rather than a debate about a news item. Most commenters describe a split feeling: they respect C++'s power, performance and ecosystem, but dislike parts of it, especially heavy template code, footguns and long compile times. A recurring theme is that the 'which C++?' question matters, since modern subsets feel much better than legacy or template-heavy codebases. Several people who used to write C++ say they moved to Rust, C# or Python and now find it hard to go back, while others say they still enjoy it on side projects. The mood is measured and mostly nostalgic or pragmatic, with a few light jokes about AI tools writing the C++ for them.

  • Enjoy it for power, control and ecosystem despite flaws (many): Commenters praise C++ for low-level control combined with high-level abstraction, and say its ecosystem is hard to match. They accept footguns as the price of that power, and some say disciplined use avoids most of them.
  • Enjoyment depends on which C++ dialect is used (many): Several argue that modern C++ with ranges, concepts and modules is pleasant, while legacy code, template-heavy libraries or kitchen-sink codebases are painful. Some say they would enjoy C++ if they could avoid templates entirely.
  • Moved to Rust and no longer enjoy C++ (some): Some long-time C++ users say Rust's algebraic types, pattern matching and trait system made C++ feel dated. They still maintain older C++ projects but no longer enjoy starting new ones.
  • No longer enjoy it; prefer other languages (some): A few commenters have moved to C#, Python or C and say C++ has too much complexity and bloat. One says the hardest part was simply finding the features they need, and another says they never liked its original OOP syntax.
  • Use C++ as a selected subset to stay productive (a few): Some use a subset of the language they find comfortable, treating the rest as bloat. They say enjoyment and productivity are separate, and they feel productive in C++ even without loving it.
  • Compile times and template complexity are the main pain (a few): Commenters point to very long compile times and incomprehensible template systems as the biggest negatives, though some note that structuring source code well helps compile times.

Links from the comments

#cpp #programming #rust #languages #templates #discussion