| ▲ | rubymamis 2 days ago | ||||||||||||||||
I also write complex UIs with QML and C++. I do not consider myself an expert in C++ but there is clearly a subset of it that I feel comfortable in. I think the combo of QML & C++ is great since QML lets you focus on the UI - and does a great job at it, and in C++ you can write performant code. C++ isn't that complicated these days - if you stick to a subset you're familiar with. | |||||||||||||||||
| ▲ | palata 2 days ago | parent [-] | ||||||||||||||||
How much experience do you have writing mobile apps in Kotlin or Swift, as a comparison? I have worked in C++ for years, and in Swift for years. I have seen the exact same app being written both in Java and in C++. > in C++ you can write performant code This almost certainly does not matter for a mobile app, and definitely not for the UI part. In case your app has to do something that may need C++ (e.g. computer vision), then you can just call a C++ library over FFI. > C++ isn't that complicated these days I didn't mean that it is complicated. I can totally write C++. What I meant is that it is more complicated to get it right than modern languages. If users complain about a segmentation fault, it's often pretty tricky to debug. In Java/Kotlin, you will get an exception that tells you exactly which line crashed. On top of that, C++ is slower to write. Again I have been able to compare teams working on the same app both in C++ and in Java/Kotlin/Swift (Java is not exactly a modern language, but still it's a lot faster to develop with). And after all those disadvantages of using C++ for a mobile app, you end up with a UI that doesn't feel native to the platform. Again: I still write C++ when it makes sense (usually that's for legacy reasons or libraries availability, otherwise Rust is a better choice IMO). But for writing a mobile UI? Doesn't make any sense to me. Even for writing a Desktop app, I don't understand why people use Qt instead of e.g. Java. Kotlin/Compose seem to be coming on Desktop too, which makes a lot of sense to me. And maybe even Flutter. Finally, I don't understand writing a cross-platform UI for Desktop and mobile. On mobile, I have a big finger and a small touch screen. On Desktop, I have a big screen, a mouse and a keyboard. Those require different UIs. Sharing the logic is fine, but the UI needs to be written for the platform. | |||||||||||||||||
| |||||||||||||||||