3 ms·
There are pros and cons to each of your points. It just so happens Apple chose almost the exact opposite when compared to Android. - portability between
by pkaler 16y ago
There are pros and cons to each of your points. It just so happens Apple chose almost the exact opposite when compared to Android.
- portability between hardware architectures
Android went with the VM solution. Apple chose fat binaries when going from PPC to X86. They also use fat binaries for ARMv6 and ARMv7.
- portability between operating systems (mostly)
Apple handles this at the OS, framework, C language, and compiler (LLVM) level. The Unix bits of OS X and iOS are essentially the same. CoreFoundation is essentially the same across iOS and OS X. Cocoa and Cocoa Touch share the same design ethos as well as a number of classes.
If you assume Unix then a VM isn't that big of an OS portability win.
In general, Apple doesn't believe in cross-platform Apps. They believe in trans-platform Apps. Every single pixel in a Mac, iPhone, or iPad App should be pixel perfect. Java and a VM doesn't really give you any benefits with respect to this.
- memory management that doesn't suck
Objective-C 2.0 on Mac OS X has garbage collection. I imagine garbage collection will come to the iOS world when Apple believes that the performance tradeoffs make sense.
In general, memory management is hard. Memory leaks are trivial to find for an experienced programmer with Instruments. Leaks are tough for a novice programmer. But hey, life is tough for a novice programmer.
Memory management involves more than just garbage collection. Running out of memory is a big problem on handheld devices. A VM can compact memory but you can't do anything about VM memory overhead.
- and yes, decent speed in return for a high-level programming language
I'd argue that a message passing language like Objective-C is actually just as high-level (if not more) than a method calling language like Java.