Hacker News new | ask | show | jobs
by xorcist 4244 days ago
CPython is not very fast, but that has nothing to do with Dalvik. When designing Dalvik from scratch they could have chosen any syntax, they didn't have to stick with Java. They could just as easily have chosen something Pythonic and ended up with something close to Groovy.

Performance was obviously not the main goal with Dalvik. If it was they would have gone with something like C++ or Go. The first versions of Dalvik was quite slow. Compact bytecode looks like the design goal which probably made sense since mobile bandwidth wasn't great at the time.

2 comments

Right, they could've chosen any syntax, but they can't necessarily choose any semantics. Dalvik (and now ART) doesn't just look like Java, it behaves like Java, which means that if you're a Java programmer you can pick up Android basically immediately and have a good idea how it works. If they'd chosen a Python syntax but left out, say, keyword arguments and metaclasses and overloading of built-in operators, I doubt many Python developers would consider it the same language.
> They could just as easily have chosen something Pythonic and ended up with something close to Groovy

If you're talking about syntax then do you mean Dart? Now Dart compiles to JS, perhaps it's time for it to compile to ART.