20 ms·
Haxe: Cross-Platform Development's Best-Kept Secret
- thosakwe 8y agoIt might be time to try Haxe. I’ve always wondered why it doesn’t get a lot of buzz around it. It seems like a genuinely good way to achieve “write once, run anywhere.” It’s always interesting how the chicken-and-egg problem applies to programming languages.
- giancarlostoro 8y agoIts a nice language though some of the output is weird. Like I did a PHP target as a test and I think I did a print statement and it added a lot of code in there when i was expecting a simple echo or something. So it can have its downsides depending on what you do. Definitely curious where it stands for Mobile though.
- swsieber 8y agoIt's great for mobile games - it has a nice foundational library, OpenFL, and an assortment of wd game engines.
- xet7 8y agoThere has been a lot of progress to clean up target languages syntax, as can be seen from talk "Haxe 4.0" by Nicolas Cannasse: https://haxe.org/videos/conferences/haxe-summit-us-2018/ https://haxe.org/videos/conferences/haxe-summit-us-2018/
- kevin_bloch 8y agoI wonder, did you have the "dead code elimination" feature enabled? (Just throwing it out there. I haven't tried transpiling to PHP with it myself. :) )
- giancarlostoro 8y agoNot sure, this was many years back but if it wasn't a default it's very likely I didn't.
- simion314 8y agoLanguages without a big tech company behind do not get popular, all the popular new languages ahve big companies behind Rust,Go,TypeScript
- catach 8y agoSingle-big company control/backing is not sufficient (Dart) nor historically necessary (Python, Perl, Scala, Ruby, PHP, Lua, JS). I'd agree though that it's a huge marketing win.
- dgreensp 8y agoThe biggest thing that interests me about Haxe is it is rare to find a high-level language with a sophisticated static type system and familiar syntax. This is why TypeScript is so much beloved, but Haxe has some awesome features TypeScript lacks, like a pattern-matching switch statement (with guards), and array comprehensions.
- Drakim 8y agoAnd don't forget the macro preprocessor, it's made life a lot easier for me in so many ways. Syntax sugar, automatic asset inclusion, compiling tasks, and much more.
- disqard 8y agoI couldn't agree with you more. The pattern-matching in Haxe has really helped keep my code more readable.
- rwmj 8y agoWritten by a long-time OCaml developer, so not too surprising.
- stewbrew 8y agoIs haxe used for anything other than games? The userbase seems to have a focus on flash, games etc.
- joneil 8y agoI’ve used it for web (my failed startup was in Haxe, my side projects still are mostly Haxe). To be honest these days I mostly just use it as a “better JavaScript” because I’d prefer my backend to be NodeJS rather than PHP or Java or sone other Haxe target. But I really do prefer it to JavaScript, even with Babel and Flow and ES6 and all the things to modernise Js.
- 52-6F-62 8y agoCurious— have you ever tried compiling to C++ or CS for the backend?
- disqard 8y agoSame here. It's a "better Javascript" for me as well. My constraints force me to use JS for what I'm building, and Haxe does a great job of insulating me from having to write and maintain a large codebase in JS.
- kevin_bloch 8y agoFor sure--see the examples of FontStruct, TiVo, DAZN, Heidi, etc. in the article, along with the part just before the quick start section. :) (It's true, it does have a large gamedev following, but it's actually quite versatile.)
- andyonthewings 8y agoThere are some people used it quite extensively for web development (both front and back-end). This year's Hong Kong Open Source Conference will feature two Haxe talks, both are web focused: * https://hkoscon.org/2018/topic/haxe-better-javascript-practical-guide-making-front-end-development-fun-fast-and-less https://hkoscon.org/2018/topic/haxe-better-javascript-practi... * https://hkoscon.org/2018/topic/type-safe-rest-api-haxe https://hkoscon.org/2018/topic/type-safe-rest-api-haxe I believe there will be live streams, or you can checkout the video that will be available shortly after. (I'm a member of the Haxe Foundation, also the organizer of the HKOSCon Haxe track)
- cojo 8y agoWe used Haxe for a while at my last company for a cross-platform engine that would actually run well on web (browsers couldn't yet handle "real" Unity WebGL builds at that time). While it "worked" and the resulting engine / suite of games ended up net profitable, and I'm a fan of Haxe's features as a language (I am really missing the pattern matching and macros in Typescript these days), I must say the build pipeline and available tools for OpenFL / Haxe games was lacking at best. On the plus side being able to fork and fix issues we ran into was a game changer over Unity IMO. Not sure if the ecosystem has evolved / improved on the build and tooling fronts in the last 18 months since I last interacted with it directly, but that would be the one word of caution I'd offer to anyone after they read this article. Be prepared to roll up your sleeves and get a little dirtier than usual if you really intend to ship on both web and mobile.
- kevin_bloch 8y agoNot sure of the specifics in the last 18 months on straight OpenFL, but I know that some frameworks built on top of it had nice features like hot reloading. HaxeFlixel has an in-game debugger, too, for example. I guess it depends on the types of tooling you had in mind.
- larsiusprime 8y agoOpenFL's matured a bit since then and I quite like it personally, though I should point out that OpenFL is simply one of many libraries, and the rest are worth checking out, too! OpenFL's probably the most well known but the ecosystem has a lot to offer beyond that.
- pier25 8y ago> I must say the build pipeline and available tools for OpenFL / Haxe games was lacking at best That was my experience as well. Too many moving pieces going in different directions. When it wasn't a Lime issue, it was Hxcpp, or OpenFL, or a combination of these. That was 3-4 years ago though.
- heckanoobs 8y agoI used Haxe and NME years ago to build an Ouya (RIP) game. I was coming from actionscript and it was a delightful language. Glad to see it's still evolving. That game project was a blur of haxe, java, and c++ due to Ouya's infancy and haxe could handle it all. I was impressed
- jadbox 8y agoI've been using Haxe over a decade, and it's really a shame it doesn't get more attention. The language is amazingly productive for game development, although lacking the GUI tools of Unity.
- canada_dry 8y agoLike I did a few years ago, I quickly browsed through some of the sites and didn't find solid quick start stuff needed to get me (a haxe noob) to go further. For a 'mature' platform looking to get more attention I would have liked an easy step-by-step demo 'hello world' for a haxe -> android target. But, I couldn't even find much in the way of haxe-for-dummies that specifically address the android target.
- madmulita 8y agoOh, but, if you have wine or some virtualization software you can run quickly get started using 'haxedevelop'... I guess it's not that multi-platform, after all.
- cmandlbaur 8y agoSure, or vscode, vim, IntelliJ, sublime. There are a ton of options.
- catach 8y agoThat's a bit like saying that C++ isn't multi-platform because Visual Studio is Windows-only.
- bendmorris 8y agoHaxe doesn't quite operate at that level, it's more compiler than build tool. You'd use Haxe to compile to Java or C++, but you'd use a framework such as OpenFL, which provides its own build toolchain, to actually build an Android app via Haxe.
- kevin_bloch 8y agoI've deployed a HaxeFlixel project to Android, a couple years ago. I'll be sure to consider this angle for a follow-up piece. Thanks! :)
- sp33der89 8y agoI have the same problem! They have a manual and a cookbook, but nothing real entry stuff or something similiar like the Go Tour. https://haxe.org/blog/haxe-online-training-courses-are-coming/ https://haxe.org/blog/haxe-online-training-courses-are-comin... <- this looked real promising not sure if they still gonna do it.
- shmerl 8y agoAmanita Design should have used Haxe instead of dead Adobe Air for their games.
- pier25 8y agoThe language is awesome, heavily inspired by EcmaScript4 / ActionScript3.
- cmandlbaur 8y agoBeen using Haxe for a webgame project and thus far have been blown away by the functionality and features available as well as the community.
- disqard 8y agoI'd like to chime in and add that I've had to rebuild an entire Visual Programming Language (think Scratch, but free of text) to migrate away from Flash. I picked Haxe, and it has been a solid language+compiler for what I needed (transpile to JS, and now my code runs on any modern browser).
- danbolt 8y agoPopular Ludum Dare contestant 01010111 has made some slick 48-hour games in Haxe.[1] Even winning the compo once too. From what I've seen Haxe has a lot of great features for individual game developers to be expressive. [1] http://ludumdare.com/compo/author/01010111/ http://ludumdare.com/compo/author/01010111/
- badsectoracula 8y agoI used Haxe years ago to make Flash games and tech demos [1] (probably only works with Chrome these days). At the time it was the only free way to create Flash games (at least using an actual programming language) but even when Adobe released some free tools, Haxe was still not only much faster as a compiler but it both produced faster code and provided tools for making things fast (e.g. `inline` wasn't just a hint, if the compiler couldn't inline a function it would error out - and inlining made a difference at the time). Eventually i lost interest in Flash and moved on to other things. I thought about using Haxe for making HTML5 games (when those were new), but unlike Flash gaming that was huge, HTML5 gaming never took off and was almost entirely about mobile games that i never cared much about. Also Haxe's JavaScript output at the time had some significant overhead that i found it simpler to just write JS directly. I've been subscribed to the Haxe mailing list for the last 10 or so years, mainly to take a peek at what is going on and sometimes try a new version (sadly it seems Haxe is sometimes breaking backwards compatibility and often found the code needing changes), but that ended recently with the mailing list shutting down. Since then i had no other contact with the language at all. Although sometimes i see people writing "one-to-many" transpilers, thinking that this is a neat new idea, while i'm in my corner muttering something along the lines "Haxe did that a decade ago" :-P. [1] http://runtimeterror.com/tech/demo/flashdemos.html http://runtimeterror.com/tech/demo/flashdemos.html
- jdonaldson 8y agoThe mailing list has been decommissioned in favor of the Haxe community site : https://community.haxe.org/ https://community.haxe.org/