News for hackers. Stuff that matters.
Re:Ask HN: What smartphone to get right now? by mahipal on Sunday August 08, 2010 @01:12PM (#1585645)
The choice of Java is one of the most mind-boggling things to me. There must be so many developers turned off of the platform because of it.

Luckily, you can now distribute Python scripts as APKs (http://code.google.com/p/android-scripting/wiki/SharingScrip...).

Re:Ask HN: What smartphone to get right now? by orangecat on Sunday August 08, 2010 @02:20PM (#1585801)
Java isn't ideal, but I much prefer it to ObjC. You can also "in theory" use any language that compiles to the JVM, like Scala: http://www.assembla.com/wiki/show/scala-ide/Developing_for_A...

Thanks for the Python APK link, last time I checked you couldn't deploy standalone Python apps but now I can play with it.

Re:Ask HN: What smartphone to get right now? by bitsai on Sunday August 08, 2010 @03:33PM (#1585959)
It's also possible to use Clojure on Android:

http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html

... although the impression I get from the stuff I've been reading is that there's a 3-4 second delay when starting up an app written in Clojure. There were hopes that Froyo will help in this regard, but I haven't been able to find any reports on that yet. My Nexus One should be arriving this week, so I guess I'll be finding out soon :)

Re:Ask HN: What smartphone to get right now? by lzw on Sunday August 08, 2010 @05:06PM (#1586159)
I submit that if you take the time to learn Objective-C you'll feel quite differently.

I've learned many languages in my years, while neither Java nor Objective-C is my favorite language right now (erlang is, though I haven't used it for awhile) they both were at different points in my life.

I hated Objective-C for the first week or two, then came to understand it, and saw how it was so much better than Java.

Of course, Java means both the language syntax and the frameworks, and half of what makes Objective-C so great is the frameworks.

Don't let syntax hang you up... you have to get over the syntax hassle to really understand a language. If you want "bad" syntax, look at erlang. That was tough, I had to force myself to learn it, but once I did, the syntax became a non-issue.

Objective-C has every advantage Java does, but the converse is not the case.

Re:Ask HN: What smartphone to get right now? by orangecat on Sunday August 08, 2010 @05:32PM (#1586218)
I submit that if you take the time to learn Objective-C you'll feel quite differently.

I've used ObjC for many years and released several Cocoa apps. The syntax isn't the problem; I actually rather like the brackets.

Objective-C has every advantage Java does, but the converse is not the case.

No garbage collection (on iOS at least), inherently unsafe, primitive types requiring silly [NSNumber numberWithInt:x] contortions, header files, no namespaces...

Re:Ask HN: What smartphone to get right now? by enjo on Sunday August 08, 2010 @08:08PM (#1586561)
Ya, managing memory in objective-c (again, on iOS) is a colossal pain.
Re:Ask HN: What smartphone to get right now? by yesimahuman on Sunday August 08, 2010 @08:12PM (#1586565)
Not to mention the OS X/Mac environment which some people just can't stand.
Re:Ask HN: What smartphone to get right now? by lzw on Sunday August 15, 2010 @03:19PM (#1605698)
I see, this is some sort of a popularity / "all the cool kids hate apple technologies" thing rather than an issue based on programming.

Cause if you think those are a list of problems, you don't know how to write software.

Re:Ask HN: What smartphone to get right now? by seanx on Sunday August 08, 2010 @05:52PM (#1586278)
Better than java is a pretty low bar but I am not sure that OC makes it even then. I learnt enough to know who much I hated it and then did most of my iphone coding in c++.
Re:Ask HN: What smartphone to get right now? by jonknee on Sunday August 08, 2010 @01:18PM (#1585661)
What would you have chosen? Java is popular, featureful (have fun allocating memory with objective-c while working on iOS apps!) and fast. I'd bet that it got more people interested than turned off.
Re:Ask HN: What smartphone to get right now? by technomancy on Sunday August 08, 2010 @04:14PM (#1586047)
> Java is popular, featureful (have fun allocating memory with objective-c while working on iOS apps!) and fast.

More importantly, it's the most popular VM to target for new language implementations. You can use Rhino, Python, Lua, Scala, Scheme, Clojure, Fantom, Frink, and others on it.

Re:Ask HN: What smartphone to get right now? by jacoblyles on Sunday August 08, 2010 @05:59PM (#1586301)
With a substantial speed penalty on Dalvik.
Re:Ask HN: What smartphone to get right now? by technomancy on Sunday August 08, 2010 @07:19PM (#1586462)
True in cases where code relies on Hotspot's server JIT and GC, but the fidelity of the JVM->Dalvik bytecode conversion is remarkable.
Re:Ask HN: What smartphone to get right now? by tjstankus on Sunday August 08, 2010 @01:38PM (#1585703)
Java is popular in the broad sense, but it doesn't seem to be very popular with the developers I know that are creating and interested in creating mobile apps.
Re:Ask HN: What smartphone to get right now? by falien on Sunday August 08, 2010 @02:03PM (#1585759)
Even if its not well liked in the most tech forward circles that may be the most desirable audience for google, there should at least be familiarity with it. And I don't know about you but I can't think of any even halfway decent and plausible alternative google could have chosen.
Re:Ask HN: What smartphone to get right now? by jonknee on Sunday August 08, 2010 @01:55PM (#1585738)
Is that because they are iPhone users or because Objective-C is a better language for mobile development?
Re:Ask HN: What smartphone to get right now? by woadwarrior01 on Sunday August 08, 2010 @02:13PM (#1585786)
Probably a combination of iPhone's traction and the general negative sentiment towards Java. I personally feel Objective-C is a good fit for mobile development, because its so easy to drop down to C at any time. And I'm sure I'm not the only one who thinks its conceptually simpler than Java (The Obj-C all just C structs and functions under the hood).
Re:Ask HN: What smartphone to get right now? by tjstankus on Sunday August 08, 2010 @09:37PM (#1586714)
I think it's general sentiment against Java, the language. Many I know, including me, have been there and don't want to go back. At the same time the JVM is a pretty interesting space for language runtime.
Re:Ask HN: What smartphone to get right now? by amackera on Sunday August 08, 2010 @09:22PM (#1586683)
Garbage collection, (now) JIT compilation, combined with Dalvik, plus lots of developers know the syntax. Not to mention you can use native code with the NDK.

Java was a good choice in my opinion. I've done enough development for Android to love it, hate it, then love it all over again.