Hi, On Mon, Mar 10, 2008 at 12:01 PM, Digit <[EMAIL PROTECTED]> wrote: > we don't want to keep everything in the VM. we, the Android team, are *very* > practical animals. > we know that all languages/runtime suck at certain things. our choice of > Java stems from practical > considerations more than anything else, and we really don't have a religion > for it. it has benefits > and annoyances. > > let's just say that for what we want to provide, an initial Java path is the > one that sucks less :-)
I can see the advantage of the VM for third party applications. However, if one is the actual manufacturer of a licensed Android platform, it seems like a huge investment to have to rewrite say an already optimized and tuned application. In other words, it does not seem very appealing to be required to re-architect an SDL/Gtk+/fill-in-the-blank application to use the Android Java UI framework and then somehow re-partition the native code into libraries that may or may not be easy to combine with JNI. I can understand the restriction of Java imposed on third party developers, but I cannot see the benefit for a platform licensee that has an extensive native code base. I hope such restrictions will go away. Sean > > > > On Mon, Mar 10, 2008 at 5:34 PM, Erik Martino <[EMAIL PROTECTED]> > wrote: > > > > > It is true that compiling C to Dalvik is not generally feasaible. > > However you you can come really close with a slightly restricted > > language like this one > > > > http://en.wikipedia.org/wiki/Cyclone_programming_language > > > > Cyclone uses tricks ("Fat" pointers) to make pointer arithmetics safe. > > It is not completely general, but may get you 95% of the way. > > > > If you want a completely generel C with full pointer arithmatics and > > everything there is of course NestedVM which basically compiles C into > > a MIPS binary and translates the MIPS binary into Java byte codes > > where the memory segments is represented by arrays. It is of course > > slow, ~factor 10. > > > > If you really want native access there are other phone platforms that > > probably is more attractive like the iphone. The whole point of > > android, in my view, is to keep as much as possible in the vm. > > > > > > > > > > On Mar 10, 4:58 pm, Digit <[EMAIL PROTECTED]> wrote: > > > Dalvik respects some of the JVM's memory semantics. you cannot perform > > > raw-pointer accesses with it for example. > > > this means that compiling C/C++ to it is not generally feasible. > > > > > > but you can envision writing C/C++ code that is called through JNI > (useful > > > for a lot of CPU-intensive stuff, while the App UI is still in Java and > can > > > use many Java services). and in Android, such a program crashing would > only > > > bring down its process, not the whole system. > > > > > > On Mon, Mar 10, 2008 at 4:34 PM, Erik Martino <[EMAIL PROTECTED]> > > > > > > > > > wrote: > > > > > > > > > > > > > Another solution would be to create a C/C++ compiler that targets the > > > > dalvik VM. Then you would have tonnes of code ready to use that would > > > > still be platform independent and doesn't bring the phone down when it > > > > crashes. > > > > > > > On Mar 10, 1:43 am, sbVB <[EMAIL PROTECTED]> wrote: > > > > > Hi, all > > > > > > > > For many reasons, Android MUST have a C/C++ SDK. > > > > > For instance: I have countess lines of code written in C++ and > > > > > wxWidgets; of course, I want to compile this to Android. Don't tell > me > > > > > Java is better. > > > > > I'm focusing in reusing my code. > > > > > > > > I've spent many hours digging out the web, finding "hacker-like" > > > > > recipes to use native code on Android, as well as my own hours of > > > > > experimentation. > > > > > But that's not the way it should be. > > > > > > > > For the sake of Android, the Google development team must provide a > > > > > complete C/C++ SDK for Android, much similar of the one found in > > > > > Linux. > > > > > Development tools such as g++, make, ldconfig, ar, etc. should be > > > > > included in this C/C++ SDK for Android. > > > > > > > > If Google does not provide this C/C++ SDK, Android might get > > > > > discredited. > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Internals" group. To post to this group, send email to android-internals@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-internals?hl=en -~----------~----~----~----~------~----~------~--~---