Hacker News new | ask | show | jobs
by Kelteseth 298 days ago
Not sure why you are getting downvoted, but this alone would make me switch (Still waiting for Qt moc support):

> No more weird forward declarations

We c++ devs just have collectively accepted that this hack is still totally ok in the year 2025, just to improve build times.

1 comments

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++.
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.