3 ms·
Actually I don't see much benefits from using Qt. C++ is pretty old language that doesn't have a GC and its syntax for me is worse than Java's.
by codedokode 10y ago
Actually I don't see much benefits from using Qt. C++ is pretty old language that doesn't have a GC and its syntax for me is worse than Java's.
- pjmlp 10y agoQt developers are nowadays pushing for JavaScript instead. Qt5 programming model is that C++ Widgets are legacy and you are supposed to do the UI in QML, a JavaScript dialect, while coding in C++ the business logic or the hardware interaction of new widgets you might create.
- winter_blue 10y ago> Qt developers are nowadays pushing for JavaScript instead. Uh. I've used JavaScript in a production environment, and I really really don't like it. It feels like a massive step backwards to me, when there's so many good languages out there. I wish developers would stop pushing for JavaScript everywhere. Having to use it in the browser is horrible enough. Please don't write servers and other back-end code as well in it now. I personally wouldn't even use it for web front-end--- I would rather use a language like Elm, that cleanly compiles to JavaScript.
- humanrebar 10y ago> ...and its syntax for me is worse than Java's Both C++ and Java have been improving their syntax in recent years. I'd recommend reintroducing yourself to the latest version of either.
- codedokode 10y agoBut the header files are still there, aren't they? One still has to write a method name and arguments twice.
- humanrebar 10y agoYou're talking C++, clearly. First, you could write things header-only and avoid repeating yourself if that's your concern. Much of boost is written this way. There are advantages and disadvantages to that, but it's less code. Second, there are experimental modules systems available that avoid many of the disadvantages of header-only code. If things go well, modules will be standard in C++20. There are certainly things I would improve about the syntax of Java and C++, but both are improving quickly in that regard.
- winter_blue 10y agoC++ has gotten a lot better with C++11/14/17. It's almost like a new language now. I agree the syntax is not the nicest. But not having a GC is not really that big of a problem. I honestly (literally) never have memory-related problems while writing C++ because I either use smart pointers, or always allocate/free objects in the constructor & destructor. I rarely even find myself calling 'new' because everything gets allocated by the STL containers. There certainly is more effort involved in this, vs. using a language with GC, but that's the (small) price in effort you pay for far more efficient memory usage and no arbitrary GC freezes.