Hacker News new | ask | show | jobs
by sho_hn 1174 days ago
> It does have it's drawbacks. The MOC heavily penalizes build times, and build caching tools like ccache don't work out of the box with it. So not only does the MOC worsens builds, it also prevents basic optimizations from mitigating it.

You have to compare those drawbacks directly to the alternatives, though. I don't have numbers to cite, but I think the attempts at replacing the moc with newer C++ lang features also usually didn't exactly hit the compiler fast paths.

Yes, perhaps optimizing the compilers would be nicer.

> You have to compare those drawbacks to the alternatives, though. I don't have numbers to cite, but I think the attempts at replacing the moc with newer C++ lang features also usually didn't exactly hit the compiler fast paths.

Maybe so, but this is not what my comment is about. What I'm saying is that MS has made much more invasive changes to C++ as a language than Qt has in its platforms or frameworks, e.g. compiler-backed extended and different behavior. Or look at C++/CX (since phased out, thankfully).

There's a lot of "If you're using Qt you're not using C++!!1" FUD to confuse newbies, while it's much easier to inadvertently write non-portable C++ with many other frameworks. Yes, it's a whatboutism (which I hope to have compensated for with many other detailed comments in the thread), but this double standard tends to irk me.

1 comments

> You have to compare those drawbacks directly to the alternatives, though.

It's ok to claim that Qt's MOC optimizes for developer experience,and all other tradeoffs are acceptable.

> I don't have numbers to cite, but I think the attempts at replacing the moc with newer C++ lang features also usually didn't exactly hit the compiler fast paths.

This doesn't really matter. It's not just the MOC. Using Qt UI form files forces UIC into the picture, which also fails to be cached.

> Yes, perhaps optimizing the compilers would be nicer.

The compiler is not the problem. Obviously. WPF also uses code generators and it's not plagued with long build times.

> Maybe so, but this is not what my comment is about. What I'm saying is that MS has made much more invasive changes to C++ as a language than Qt has in its platforms or frameworks, e.g. compiler-backed extended and different behavior. Or look at C++/CX (since phased out, thankfully).

This reads like whataboutism, and fails to address Qt's problems.

> There's a lot of "If you're using Qt you're not using C++!!1" FUD to confuse newbies

I never saw that once, not do I understand why that is relevant.