PDA

View Full Version : Why is Android using Java as its application layer environment



mercury80
July 17th, 2010, 02:27 PM
I am puzzled as to why google what to use java in stead of something like C++ for Apps. I understand Dalvik Virtual Machine is very good, but for something so sensitive to power consumption as hand held units... Can someone enlighten me?

Here is a speed comparison i saw almost a year ago:
http://www.youtube.com/watch?v=It8xPqkKxis

gnomeuser
July 17th, 2010, 03:10 PM
ease of development, latching on to an already established modern language, faster development for applications, modern features such as garbage collection.

Android plays other tricks to save power, such as very aggressive suspending and an approach to multitasking where applications are largely also "suspended" when not in use.

Shining Arcanine
July 17th, 2010, 04:48 PM
I am puzzled as to why google what to use java in stead of something like C++ for Apps. I understand Dalvik Virtual Machine is very good, but for something so sensitive to power consumption as hand held units... Can someone enlighten me?

Here is a speed comparison i saw almost a year ago:
http://www.youtube.com/watch?v=It8xPqkKxis

Google supports programming in C/C++ on Android. It is just not well known:

http://developer.android.com/sdk/ndk/index.html


ease of development, latching on to an already established modern language, faster development for applications, modern features such as garbage collection.

Android plays other tricks to save power, such as very aggressive suspending and an approach to multitasking where applications are largely also "suspended" when not in use.

Garbage collection is not a modern feature because LISP had it in 1958. Historically speaking, people have been against doing serious programming in garbage collected languages because they are slow.

Also, C++ is a modern programming language. I believe that languages including and more recent than ALGOL 68 are all considered to be modern.

BuffaloX
July 17th, 2010, 11:51 PM
Even the Commodore 64 Microsoft Basic Interpreter had garbage collection.
It sucks.