Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just because support for multiple platforms is the goal doesn't mean that it has to share the same code base.

Actually, for the author's simple use case (REST API), writing per-platform would probably have taken as much code as the wrappers themselves. Not to mention improved maintainability and a slew of other factors.

Diving down to C++ for cross-platform libraries starts to make sense when there are 4-5+ platforms (certainly not 2), or if there are complex algorithms (certainly not just a REST API), or if there's a very wide range of functionality (i.e. 100+ API calls).



C++ is currently my language to go on mobile development, even if I nowadays prefer GC enabled languages, because of:

- experience with C++ since the ARM was published

- only language common to all mobile OS SDKs and I not want to rely on third party toolchains

- C++11 makes it feel refreshing (except for compile times :\ )

- I am only doing portable graphics related stuff as an hobby

- RoboVM would be nice, but it is still kind of work in progress

In the OP case, you are right, but it could also be compensated with third party libraries like Qt, instead of the DYI approach that was taken.

However with bigger teams with disparate skillsets, maybe something like Mono would be a better approach.


I hope you also support non ARM Android devices like Samsung Galaxy Tab 3 (Anrdoid 4x on Intel Atom x86) and there are also devices with MIPS CPU.


So far only hobby stuff, so I only target my own devices, but it is quite easy to support multiple devices.

I am a bit older than C++, so I do know how to write portable code before we had VMs everywhere. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: