4 ms·
Curious project I wonder how it compares in actual portability to a project like Kotlin? Been enjoying that language and the possibility of the apps core functi
by vturner 9y ago
Curious project I wonder how it compares in actual portability to a project like Kotlin? Been enjoying that language and the possibility of the apps core functionality being cross platform.
- Lerc 9y agoI have done a few Ludum Dares using Haxe. I developed one into a a mobile game. It pretty much just worked across iOS, Android, Native Linux, Native Windows and flash. It really does compile as the same project and Build for $platform. With the exception of iOs which needs to do shenanegans with xcode. Flash version as a free to play here http://fingswotidun.com/Potato/ http://fingswotidun.com/Potato/
- aptwebapps 9y agoYour game seems to be broken atm (Chrome latest).
- fenomas 9y agoLooks like it's using Flash, and like most sites the "ask" mechanism doesn't work - it'll only show the SWF if you tell Chrome to allow it and then reload the page.
- aptwebapps 9y agoOh, of course. Didn't even notice that parent had specified it was flash.
- deleted 9y ago[deleted]
- giancarlostoro 9y agoHaxe has been around many years before Kotlin. People have done flash games in Haxe that also compile to other platforms including HTML and mobile platforms. It also compiles to many other languages. It's definitely work investigating and seeing the output.
- didibus 9y agoDoes Kotlin have its own complete standard library? I thought it used Java's? Also, does it compile to anything else then the JVM?
- meddlepal 9y agoIt compiles to JVM bytecode and JavaScript currently. JetBrains is working on a native port as well. Uses the JDK standard library currently.
- ptx 9y agoKotlin compiles to JavaScript, Java bytecode or native code (via LLVM, currently only a "technology preview"). There is a small standard library but it relies on the platform libraries for most things. For collections, Kotlin/JVM uses the Java collections with some extension functions, but on Kotlin/JS and Kotlin/Native the Kotlin standard library itself provides the same Java-like collections API. For other things, Kotlin/JS provides a tool for converting TypeScript bindings to Kotlin as well as a special "dynamic" type (kind of like .NET) to call JS APIs without bindings. Kotlin/Native has a bindings tool to generate Kotlin wrappers for C libraries. The size of the standard library for Kotlin/JS is roughly similar to AngularJS – 1.4 MB unminified or 100 kB minified and gzipped. But there is a tool (since 1.1) to eliminate the unused parts and reduce the size – e.g. for one simple tiny program I have here, library + program is 28 kB minified and gzipped.
- didibus 9y agoOkay, based on what you're saying, Haxe would be a lot more portable then. The unified standard library is key. It seems like Kotlin compilation target is more a choice you make initially, not a portability feature.
- ptx 9y agoDepends on whether you need whatever is in Haxe's standard library, I guess? I have a Kotlin program running on Windows, Linux with X11, Java with Swing, as well as in the browser, i.e. targeting native, JS and Java. That seems pretty portable to me. You just need to provide an implementation of whatever API you need on each platform you target.