Android vs iOS

As I work on Android and iOS I’m refining my opinions. Below are my current thoughts about the two ecosystems and underlying languages.

Objective C vs Java

Note: I haven’t used Swift enough to fairly compare Swift to Objective C. The presence of Swift calls into question the future of Objective C; however, I think Swift eliminates a lot of my gripes with Objective C.

Objective C wins

  • Apple docs are generally more pleasant than JavaDocs.
  • You can pass messages to nil without a NullPointerException.
  • nil is false, which fits how I generally think about problems and saves some typing (if (foo) is not as explicit but explicit null checks are noisy and easily forgotten).
  • Method names can be more expressive: stringWithCString:inputString encoding:inputEncoding is more clear to me than String(String inputString, String encoding), which, in practice, is often more like String(String s, String e). As the signature expands the problem becomes more pronounced. Objective C essentially forces named arguments.
  • Drama surrounding Java’s future under Oracle; for example, Android Dalvik is definitely not Java

Java wins

  • In wide use outside mobile development, so Java is well known and understood
  • Simpler memory management, which decreases the amount of syntax and leads to fewer bugs. This combined with the fact that Java is more widely used means that people can more easily ramp up on Android.

iOS vs Android

Android wins

  • Easy and inexpensive (a one-time $25 fee) to create and publish apps.
  • Registering to open URLs. In Android an app can register to open specific links, like or seth://foo. This improves the user experience by operating on the link in the best app: if you have the YouTube app, open the video in the app, otherwise fall back to the default browser. iOS achieves a similar effect but cannot register for https:// schemes. In practice it works well enough, but custom schemes aren’t as ubiquitous as HTTP(S).
  • Strings and localization. Android forces you to use a message catalog, which has several advantages: (1) it’s better for reuse; (2) it makes it easier to refactor; (3) it centralizes text so docs and translators can engage more easily; (4) the toolchain is more stable—Xcode crashes a lot when working with localization and it doesn’t update text changes made through interface builder

iOS wins

  • One true way to do most things. iOS is pretty strict, but it’s easier to find the proper way to do things and leads to greater consistency.
  • More stable platform.
  • Higher quality apps and community, on average. While Apple’s approval process is a pain and their developer program fees are steep (compared to Android’s $0 cost), this probably leads to higher quality.