7 comments

[ 4.4 ms ] story [ 33.1 ms ] thread
I think projects like this are interesting if only because it gets dangerously close to the idea of having one language and codebase across all platforms. There is something incredibly appealing about that concept, but it never seems to be something that is easily accomplished or well executed.

It seems like you end up with either worse applications that can't give the full "native" experience in terms of speed/responsiveness, or you end up with some kind of emulation layer at the UI level that gives a consistent, but worse experience across platforms. In either case, it never quite turns out as planned.

The closest I've seen to this working is maybe games written in C++ that can be fairly easily built for different mobile platforms with a few native language bits done via a bridge where needed.

I think you'd be interested in Haxe. http://haxe.org/ Worth mentioning some popular Haxe libraries too... http://www.openfl.org/ http://www.haxeflixel.com/

Native level performance across desktop/server and mobile (and allows targetting the web, including WebGL and WIP support for Emscripten), open-source, reasonably easy to learn (pretty similar to ActionScript 3, so tutorials on Flash get you pretty close to understanding Haxe).

Worth a look IMO.

> The closest I've seen to this working is maybe games written in C++ that can be fairly easily built for different mobile platforms with a few native language bits done via a bridge where needed.

Speaking for the game industry, C++ is probably the only thing you can use almost everywhere. Some handhelds/consoles have certification gates and their own weird compilers. And almost every platform that runs games can run native code to some extent. Even browsers lately, if indirectly, with stuff like Emscripten and PNaCl.

So languages that compile to C (like Chicken) or have embeddable lightweight interpreters (like Lua) are similarly portable.

It's pretty ironic but it's true. C++ is your best option if you need code that works on multiple platforms. You could always write in C I guess but personally I find C too low level for app development.
The approach Xamarin has taken with this makes the most sense to me. You share your core application logic among platforms but the UI for each platform is coded using the native toolkit. It's more work but results in better user experiences than cross-platform UI toolkits provide.
For Lisp-ness on both Android and iOS there is also mocl, https://wukix.com/mocl
how's dealing with UI on those two projects? couldn't grasp anything on this front from the code i found on the few pages i skimmed :)