r/cpp • u/victor-s8n • Nov 03 '26
How I design C++ classes
https://rafb.eu/blog/cpp-class-design/This is my first ever blog-post, any feedback is welcome! ofc, no AI got used.
63
Upvotes
r/cpp • u/victor-s8n • Nov 03 '26
This is my first ever blog-post, any feedback is welcome! ofc, no AI got used.
View all comments
2
u/Sachu_James Nov 04 '26
The part about not jumping between header and cpp when you add a method stuck with me. I have felt that pain with heavy template headers, where one include drags compile time up for everything that touches it. The factory version keeping the impl in one cpp file while the header stays clean feels like the main win here, more than the testability bit.