Hacker News new | ask | show | jobs
by imtringued 298 days ago
The only thing that forward declaration buys you is avoiding to include a header, which is not that expensive in C, but thanks to templates something as innocent as including a header can become infinitely expensive in C++.
1 comments

Forward declaration breaks dependency chains so that you don't need to recompile vast swathes of your codebase anytime an upstream header file is modified.