Until very recently, Dropbox had a technical strategy on mobile of sharing code between iOS and Android via C++. The idea behind this strategy was simple—write the code once in C++ instead of twice in Java and Objective C (Swift and Kotlin weren't around yet when we adopted this strategy).
We have now backed off from this strategy in favor of using each platforms’ native languages. This decision was due to the (not so) hidden cost associated with code sharing.
Come with me on a journey of how dropbox set about to share code via C++. What went well, what went wrong, what are the main lessons we learned and what this means for how we write code going forward.