7 ms·
A bigger question on my mind has been why would a shop as smart as Google not have started out with a sane language like python in the first place instead of fo
by aswanson 13y ago
A bigger question on my mind has been why would a shop as smart as Google not have started out with a sane language like python in the first place instead of foisting this java idiocy on another generation of devs.
- tvon 13y agoI think this decision was made by Android Inc. before Google purchased them.
- druiid 13y agoI've always wondered this as well. I mean, Google loves Python as evidenced by App Engine, how many of their internal/external tools use Python and other projects I'm forgetting. Basically I would have at least expected it as a built-in option to use (kind of like how Windows Phone 8 has a higher-level and lower-level way of accessing the phone).
- pekk 13y agoApp Engine has, if anything, better support for Java than Python.
- druiid 13y agoI might be remembering incorrectly, but wasn't the launch option for App Engine their home-grown version of web.py?
- bsimpson 13y agoThey started with Python and their own webapp framework; Java support came years later.
- jfoster 13y agoCan you give some examples of how that is the case? I don't know of any App Engine Services available on Java not available on Python (or vice-versa). They seem to be equally supported. It's Go & PHP that are in "Experimental" mode. (per https://developers.google.com/appengine/ https://developers.google.com/appengine/)
- crncosta 13y agoWe will never know. I guess because Python is not statically typed. Most of the efforts they have been supporting (golang, dartlang...) are evidence of they prefer to have Static type-checking around.
- chris_mahan 13y agoI think personally that it might have to do with sandboxing python, so third-party apps could be run safely, stopped, restarted, etc.
- nly 13y agoJava has a granular, stable and simple byte code, Python does not. Java is amenable to static analysis, mainline Python isn't. Dynamic typing means more runtime, burns more battery. Java also allowed them to leverage a mature and highly optimized frontend. Back in 2008, Psyco/PyPy was there... but fairly wet. Until recently(?) the primary JIT back-end for PyPy was, in fact, still the JVM.
- Lexarius 13y ago> Until recently(?) the primary JIT back-end for PyPy was, in fact, still the JVM. This sounds false. The PyPy Features page does mention that PyPy will run on the JVM, but that it is incomplete there, and in particular they don't have their JIT ported to it yet. Do you have any source on that?
- woadwarrior01 13y agoPyPy has had experimental backends for JVM, CLI and LLVM, but AFAIK, none of them have ever been the primary backend.
- jnbiche 13y agoIt also had a JavaScript target in the beginning. Pretty cool. But I understand why they had to drop those to concentrate on their primary RPython backend. Since building a fast, self-hosting compiler was one of the main goals of the project (another major goal being to create a JIT compiler framework for any language to adopt, which PyPy is great at but no one knows it).
- woadwarrior01 13y agoI generally agree with everything you're saying. But as a counterpoint, Dynamic typing doesn't necessarily have to translate to more battery consumption. Objective-C is pretty close to Python when it comes to dynamic typing (also similar in ref-counting for memory management).
- 13y ago
- gw 13y agoBy providing a true API-compatible JVM implementation, they did the opposite of "foisting" -- they provided a way for you to run any JVM-compatible language you want. That, after all, is why we can run Clojure, Scala, and what-have-you as first-class languages on Android with access to all the same APIs as Java. It is true, of course, that they chose Java as the default language for Android development. I imagine this is because dynamic languages were not always practical on early smartphone hardware, and because there was already a large ecosystem around Java from which they could draw.
- voidlogic 13y agoGoogle should use Go for Android... Cleaner than Java, faster than Java (on Dalvik). I can imagine how slow Python on ARM Android is.... and people complain about Java code being slow on Android... I would put money on JS/V8 being faster than Python on Android too. The following comparison is JVM vs Python, so its really pretty far off the scenario we are discussing, but consider it shows almost up to two orders of magnitude difference.. http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=java&lang2=python3&data=u64q http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t... http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=python3&data=u64q http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
- Sanddancer 13y agoNon-portable. While android primarily runs on ARM boxes, the same APKs, barring any native code libraries, will run on x86 devices running android, MIPS devices, etc.
- melling 13y agoCompile on install? Compile to something else then compile to binary? PNaCl?
- voidlogic 13y agoI would go with "compile on install"
- Lexarius 13y agoMake Dalvik/JVM a compile target for Go? There is at least one project working on this.
- voidlogic 13y agoGo is portable... you just need to compile on the target. Go is write once, compile and run everywhere. Compiling would be part of the app install process; Compiling Go is much lighter than compiling C anyway.
- rdtsc 13y agoGuido was working at Google and he (I understand) try to "fix" the problem. He was told to back off and when asked about it during one of the PyCons the reply was "it was political" not technical. Moreover it wasn't just that he answered but also how he answered. One could tell he was upset by it, you could hear it in his voice.
- staffordrj 13y agoCan you pull up any sources for that?
- themstheones 13y agoThey're relating their own experience. They are a their own source.
- chris_mahan 13y agoI saw the talk. Guido's answer and tone is characterized correctly.
- daGrevis 13y agohttp://www.youtube.com/watch?v=EBRMq2Ioxsc http://www.youtube.com/watch?v=EBRMq2Ioxsc
- telcodud 13y agoQuestion on mobile/Android starts at 42:30: http://www.youtube.com/watch?feature=player_detailpage&v=EBRMq2Ioxsc&t=2548 http://www.youtube.com/watch?feature=player_detailpage&v=EBR...
- rdtsc 13y agoSee below someone someone posted the video
- sgarman 13y agoEven more interesting is what the Android guys had to say about getting newer versions of Java. The tone is very suspect and it almost sounds like they are considering another language. Perhaps that's just me reading into it. Source: http://www.youtube.com/watch?feature=player_detailpage&v=A5OOJDIrYls&t=793 http://www.youtube.com/watch?feature=player_detailpage&v=A5O... http://www.youtube.com/watch?feature=player_detailpage&v=A5OOJDIrYls&t=1535 http://www.youtube.com/watch?feature=player_detailpage&v=A5O...
- toyg 13y agoCheck wikipedia: Android was bought by Google, not created. Also, a critical element of its success was adoption by partners: in this context, preferring Java (very much the "enterprise language") over Python (hackish open-source language with minuscule enterprise presence) was a no-brainer -- hence the "it's political" answer Guido himself got from the upper echelons. As a python-aficionado, I stopped kidding myself a few years ago: Python will never be mainstream in the way Java or C# are, the number of people working with it will always be small, unless something dramatic happens at the commercial level. It's like Linux on the desktop: the masses are simply elsewhere.
- sentenza 13y agoIm saddened by this. But on the other hand, our good friend Oracle is trying to change it by trying to motivate developers to search for a non-Java language.
- simonh 13y agoTrust me, Python is doing very well at Enterprise scale. Here's a taster of what it's about in the below links, which are public information, but the Quartz platform is huge. I wish I was at liberty to discuss it in more depth. If you're keen on Python and willing to work hard, it's worth considering Bank of America Merrill Lynch. https://us.pycon.org/2013/schedule/presentation/155/ https://us.pycon.org/2013/schedule/presentation/155/ http://careers.bankofamerica.com/JobDetails.aspx?SearchPage=ASP&CountryId=232&JobId=LON05417&stateid=&cityid=&travel=&jfamily=Technology&lang=&fullpart=&shift=&datepost=&keywords=C%20%20&jobareas=&feedname=EMEAC%20External%20(web06)&BOAFeedName=&jobfamilyid=30&internationalcity=London&LocationID=10 http://careers.bankofamerica.com/JobDetails.aspx?SearchPage=...
- broseph 13y agoTake this with a grain of salt. I found working on Quartz to be much more miserable than any other platform I've ever worked with. Of course, that had to do with a lot of factors that weren't related to the language.
- mtgx 13y agoI think they answered that question, and you can probably find it with a Google search - but the reason was this: Python was too slow, especially for the time, which I think is already an uncontested fact. But for the future? Yeah, I can only hope Google is working on switching Android to Go in a few years. It doesn't even have to be an abrupt change - which definitely won't be - they're not insane. But they can add the language in the NDK or something, and then just promote it to developers as the main language they should be using when making new Android apps.
- bpodgursky 13y agoHow the hell does drivel like this get upvoted?
- zmmmmm 13y agoJust having gone through about 18 steps to install Python 2.7 on my server because we have code that only runs in 2.7, while most of the operating system only works with 2.6 and breaks with 2.7, and seeing all the backwards compatibility cluster fuck that is Python3k, I think anybody would be crazy to base an operating system like Android on Python. You can't have backwards compatibility and your progressive "keep language simple and clean by dropping features" at the same time.