Hacker News new | ask | show | jobs
by blackflame7000 3119 days ago
You're right about most compilers having a build system MSVC being probably the biggest.

Modern C++ when combined with Qt makes rapid iteration very doable. In my opinion Qt should be the standard c++ model.

2 comments

QT follows a certain style, which is mostly object-oriented and heavily PIMPL based (it thereby compiles fast).

The consistent style is actually something nice. However lots of C++ programmers will not necessary like the OO style because it will lead to relatively slow programs. I guess with all the indirection which is going on and the metadata-based reflection and signal/slot system it might not really be ahead of even easier to use managed languages, which are even more convenient to use.

If you look at the Boost (or also C++11/14/17) libraries you will often find a very different programming style, which is heavily based on templates. This one is a lot harder to read and understand for non-experts, but it allows to achieve an even higher performance. The authors might think that this is the preferred model for C++.

Qt is vastly more complex than the boost libraries due to the meta-object compiler and qmake build process. Furthermore the signals and slots are passed using lock free mechanisms and you will find they hold their own in benchmarks. The biggest advantage is the thread safety Qt affords. Not sure why you equate templates with expert programmer because often times template systems offer unacceptable build times on large programs. (The boost template object serialization library for example) Qt lends itself to writing more correct and simpler to digest code which any expert programmer will tell you is far more important than fast code
I didn’t imply in my post that boost is the better choice for experts. Exactly because I also don’t think that is always true. I only mentioned that lots of Boost libs are harder to use for beginners than Qt base once since one often needs to understand a good amount of templates. whereas Qt is mostly based on a sniper object oriented model with inheritance.
Having been a former Qt developer, I couldn't disagree more. I have no desire to touch that dumpster fire again. To its credit, it's best in class, but that isn't saying much.
I'm a fairly newer Qt developer so I really only have experience with QT5. Perhaps I was fortunate to miss the growing pains you seem to have endured. For me, the ease of doing cross-platform development along with the ability to create really high quality GUIs with QML made me fall in love.
Qt5 is much nicer, but still a pain. QML is even better, just too coupled to Qt. Unfortunately you have a point that there isn't a better cross-platform native GUI toolkit.