|
Authored by: Anonymous on Monday, May 07 2012 @ 04:17 AM EDT |
I believe you are spot on to why Google chose to use Java
for Android and why they chose the given set of Java APIs /
packages. They wanted to allow developers to reuse existing
Java libraries (e.g., from Apache) and to reuse existing
Java developer tools (e.g., Eclipse, IntelliJ, Ant, etc.).
These libs and tools, as you say, depend on the Java APIs.
Simply changing it from java.lang.Object to
android.lang.Object would break compatibility. Perhaps
nowadays it would be possible for Google to get the
necessary support from third parties (e.g., add support to
Eclipse for working with a different Java API set), but very
unlikely in the beginning of the Android project. And,
simply changing java.* to android.* is not enough. Google
would need to come up with a different SSO than Java, thus
requiring all libs to be reimplemented to follow that SSO
which is non-trivial. For example Apache Xerces could be
used for XML parsing, however the implementation would have
to be changed to use different underlying APIs for text
processing, communication, etc. All classes and their
relationships would have to be different than what is in
Java.[ Reply to This | Parent | # ]
|
|
|
|
|