4 ms·
"First, let's be clear: I am speaking to anyone but console/mobile/AAA developers here." Well, if you're targeting mobile, and by 'mobile' you include Android,
by astine 15y ago
"First, let's be clear: I am speaking to anyone but console/mobile/AAA developers here."
Well, if you're targeting mobile, and by 'mobile' you include Android, you already have to use Java. You could use Clojure in this case as well, but Clojure in my experience is too inconvenient on Android to be worth it (yet.)
- itsnotvalid 15y agoScala seems to be a little better to work with in this case. I think he is just referring to iOS. However I have to disagree the author that it's suitable for desktop GUI applications. I hate running Java programs on desktops (may be except Eclipse), as they always take much more resources than they actually needs, while still maintaining ugly interfaces all over different platforms, or would require much more work for the developers to solve issues with incompatibilities over different configurations of Java installs. For GUIs, Java is _still_ (for since Swing was available) not the choice.
- astine 15y agoIf you are writing video games, then you're not likely to be using the built in GUI tools. I agree to an extent about the resources, but games almost always use a lot of resources in my experience.
- wccrawford 15y agoI was just starting to consider Clojure on Android, too. I really dislike Java. I've tried Mirah, and it's better, but not enough better. Clojure was going to be my next attempt. What did you dislike about it? App scaffolding? Compiling? Deployment? Use of Java libraries inside Clojure?
- astine 15y agoIt's been a few months since I messed with it so it might not be as bad now, but the main problem for me was that Clojure on Android is slooowwww. This is mainly in terms of startup. You have to include the Clojure runtime with any programs you write with it and this is a substantial overhead on Android. Your binaries will be larger as a result as well. This is because, Clojure as a Lisp, expects the entire language to present all the time. This usually is the killer feature (it's a large part of what makes macros and the dynamic coding associated with Lisp possible) but it's a pain when you have limited resources. The other issue I ran into was that there were issues in getting Clojure to interact with Android properly. Android requires that you compile your code into classes which means you will have to use :genclass in Clojure and implement a lot of interfaces. This in itself isn't that much of a problem (it will make you code less Lispy but oh well) but when I tried it there were bugs in Clojure which made it impossible for me to do some things on Android that I would have liked. That part of the language runtime is a little immature in my experience. I wouldn't give up based on my words though. It may have improved since I last tried. If you want to look someplace for info on how to get started, I found that this fellow has a lot to offer: http://www.deepbluelambda.org/programming/clojure/creating-android-applications-with-clojure http://www.deepbluelambda.org/programming/clojure/creating-a...
- wccrawford 15y agoAh... That 5-10 second load time is a deal-breaker. Thanks for the info!
- pvarangot 15y agoIf I were you I would still try it. I'm a little behind on my personal projects but I'm definitely trying Clojure on Andriod this month. I've seen toy Clojure apps running on Android 2.2 and they took sensibly less than 5-10 seconds to load. I'm mentioning this since parent doesn't specify which Android version he was using, and JIT compiling was only recently introduced in 2.2.