3 ms·
Project author here. I'd say on Android, AFAIK you realistically have just no other choice than Java or (very recently) Kotlin. There's also React Native, but a
by akavel 7y ago
Project author here. I'd say on Android, AFAIK you realistically have just no other choice than Java or (very recently) Kotlin. There's also React Native, but at some point you apparently find out you still need some Java anyway. PWAs are even more limited. So, in a way, any other option is potentially interesting already just by virtue of being an alternative.
That said, as @captainbland suggested in a sibling comment, I'm not really targeting existing Android devs. If anyone, I'm targeting, basically, myself (a.k.a "scratch my itch"). Whereas this "myself" can be kinda elaborated on as a person/people who aren't Android developers, in big part because Java, and also because Android Studio. I mean, I would be OK with working in Java & Android Studio. But in my spare time, for hobby projects, I just viscerally can't bear the weight and slowness. They insta-cut my wings whenever I think of them in context of free-time hacking on some personal-use app. I explored many other weird avenues, including Yeti language, and Elm + React Native. Recently, I kinda discovered Nim, and found it an unspeakably great language for prototyping for me (in shortest words, kinda "Python + static types" extramarital love affair offspring). So, I finally thought, what the heck, let's close my eyes, and just see how far I can get (with the idea of emitting Dalvik bytecode by hand; at least a thinnest possible shim/wrapper, with some "real language" behind, either as in React Native, or via JNI). Surprisingly, it was much easier than I would hope to wish if I didn't explicitly fend off and box away any serious thought. So, that's the story :) Having achieved this, I found it a good moment for a first presentation to the world, maybe someone else would be interested too :) I would be sure interested if it were someone else who did it :)
edit: As to Nim itself, I can't put it very well in words yet. It definitely and resoundingly hits the sweet spot for prototyping for me, as of today. It's concise, Python-like readable (in my opinion), somewhat whimsical and not Go-grade serious, super close to C for FFI/wrapping (that's where I feel somewhat betrayed by Go), has static-typing without too much ceremony (Go-like, i.e. `var` instead of `Foo foo = new Foo()`), has templates and macros in case I need to up the game and reach for higher-level abstractions, compiles to small binaries (again, feel betrayed by Go). It has exceptions, which is not a net benefit in my book (I generally prefer Go's error handling robustness here), but is absolutely beneficial for prototyping (I can just focus on prototyping the happy path, and mostly ignore errors, just letting it crash). The third-party library ecosystem is kinda surprisingly not bad for a somewhat fringe (or at least non-mainstream) language. That's probably in huge part thanks to the ease of interfacing with C, and also in part because the language is actually already quite some time on the market (Wikipedia says 2008, which makes it ~1 year older than the public announcement of Go, ~2 years than rust). I personally can't say anything about how well it works for later phase/bigger projects, having zero such experience with it. You could maybe try looking at the Nim compiler sources and getting a feel of how it looks to you.
edit 2: Also, by having C & JS compilation targets, it hits two huge niches at once (and the standard library has full support for Windows, Linux & macOS). Improving the Android support feels kinda... fitting... :)
- xrd 7y agoThank you for this response, it's extremely illuminating and exactly what I was hoping for. I'm now going to spend some time playing with it; I feel the exact same way about the rough edges of Go but until now didn't have a way to put it into words. Thanks for making this project.