TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24879 18
C++ feature for DI/DIP/OCP with the widest cross-language analogue

the abstract base class interface(ABCI) via pure virtual functions is perhaps the 1st. (apart from the C style function pointer). it is analogues to type, abstract in fortran, and dyn Trait in rust and ABC / Protocol in python

sometimes due to performance considerations in compiled languages, one needs to switch to the compile time alternatives. in cpp the most common one is template(used with concept) which is close to T: Trait in rust and interface in fortran.

Do you think ABCI and template+concept are the 1st and 2nd best in cpp? what else?

https://redd.it/1s6ikn8
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 6, 2026C++26: Module improvements https://www.sandordargo.com/blog/2026/09/09/cpp26-modules https…
  2. Oct 6, 2026Tuning a Server for Benchmarking https://david.alvarezrosa.com/posts/tuning-a-server-for-b…
  3. Oct 6, 2026boost.org has been rebuilt: new profiles, badges, search, and library filtering The Boost…
  4. Oct 6, 2026When (Not) to Use alloca() https://voithos.io/articles/when-not-to-use-alloca/ https://red…
  5. Oct 6, 2026MSVC Build Tools Preview updates – September 2026 https://devblogs.microsoft.com/cppblog/m…
  6. Oct 6, 2026I built MrDocs, an open-source C++ reference doc generator on the Clang/LLVM AST. Looking…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →