6 ms·
What are the reasons you'd want to make a cross platform app using c++ these days?
by Xeamek 2y ago
What are the reasons you'd want to make a cross platform app using c++ these days?
- stagger87 2y agoSmall footprint and fast are 2 big ones.
- swatcoder 2y agoThe biggest is that you or your team are fluent in C++ and are targetting multiple platforms. In practice, fluency often pays much higher dividends than whatever differentiates one language from another. Besides that, many critical third-party resources (operating systems, niche professional libraries, etc) are still designed for C or C++ integration and often written in those languages themselves. When you use C++ to integrate them into your own project, you don't introduce an extra layer of bugs, limitations, or performance issues associated with bridging and marshalling and can more easily trace and debug issues that arise during or after development. Further documentation and support often presume you're using C or C++ and so you get the best insight into how they're meant to be integrated and the most help when you run into trouble. If you're not already comfortable with C++ or not working in one of those scenarios, it's less warranted, but the two factors above account for plenty of real-world projects.
- rock_artist 2y ago> When you use C++ to integrate them into your own project, you don't introduce an extra layer of bugs I’m mixed about this statement. Yeah, I had to write some pimpls to make cross platform API for multiple OSes. And I’d also say modern C++ got nice compile time checks and makes safer code. Still, it doesn’t reduce potential of bugs or security issues due to race conditions, or direct memory interactions in comparison to writing in Swift or Rust as an example and binding what you need.
- Asooka 2y agoIf you want it to be fully native and not have to carry a runtime, C++ is pretty much your best choice. I think technically Python could be pretty slim if you just bring the runtime and build the GUI out of raw Win32 calls in Cython. That is something I've been thinking of trying for a while but mostly as a toy project to see how small you could get a Python GUI tool and not something for production.
- 01HNNWZ0MV43FF 2y agoHaving used the windows crate for rust, I can say the raw win32 API is quite painful
- bozey07 2y agoIt doesn't seem like that odd of a choice. What else would you use?
- 01HNNWZ0MV43FF 2y agoRust, Go, TypeScript, C#