Thursday, February 28, 2019

Giving up on Qt and C++

I gave it a valiant try, but I have decided to give up on Qt and C++. It clearly works for some people, but not for me.

On the Qt side, I had several issues. Qt is very complicated, which sometimes allows it to perform magic once you've gotten everything set up just so. On the other hand, things like a undo stack are mostly left to the developer. The worst part is that the text editor widgets have their own built-in undo stack that is very difficult to integrate with an application wide undo.

Another issue I had with Qt was trying to sort out the Qt vs QML documentation and tutorials. Not only was it distracting, but I got the feeling that QML is their future direction, at the expense of Qt/C++. I have no interest in writing any more javascript code, so QML is out for me. It also seems very mobile focused, while I'm interested in desktop apps.

C++, where to begin? I know there are many rants about the problems with C++, so I'll only touch on the highlights that drove me crazy. Number one is header files. Somehow they managed to take a C feature that is not without problems and make it 10 times worse. Having to almost duplicate the class declarations in the definitions was incredibly annoying. I guess if you use the IDE it can help you with that, but I'm a vim/make guy so the IDE was a no go.
The other big issue I had was that it was incredibly confusing when objects were created, and therefore when I had to free them. I'm sure the C++ people think they are really clever for inventing the way they can pass around objects without copying, but if I have to do memory management I need to know what's going on underneath.

So farewell Qt and C++. I know you are a great combination for many, but not for me.