5 ms·
Haxe is pretty cool from a language standpoint. It’s certainly an improvement in some areas on its closest relative, ActionScript 3. Particularly “enums”[1] (AD
by evincarofautumn 13y ago
Haxe is pretty cool from a language standpoint. It’s certainly an improvement in some areas on its closest relative, ActionScript 3. Particularly “enums”[1] (ADTs) are excellent to have, as I’ve been spoiled by them in Haskell, as well as proper generics, “switch” as an expression, and other such goodies. Bit of a shame that they kept the fat old “function” keyword, though. The type inference system is also a bit lacking—I don’t like how it can depend on control-flow order whether you get a type error or not[2].
I recall that the compiler would often produce different behaviour on different backends, including crashes. Presumably this has been addressed in recent versions? It’s one of the reasons we chose AS3 when developing Spaceport[3] and stuck to matching Flash behaviour as closely as possible.
[1]: http://haxe.org/ref/enums http://haxe.org/ref/enums
[2]: http://haxe.org/ref/type_infer http://haxe.org/ref/type_infer
[3]: http://spaceport.io/ http://spaceport.io/
- novalis 13y agoI don't see how type inference in Haxe is worst than AS3 type inference. Think it stands on its own on that particular point. I also never had a crash with something out of the running service compiler, even earlier since I started using it at 2.x, you probably evaluated it in a 1.x version ? You talk of enums but that was at the top of the "pros" around 4/5 years ago. Leaving AS3 and being able to target all the systems I want to target, was the reason Haxe became valuable to me. So that "reasons we chose AS when developing Spaceport" is sort of telling about Spaceport and nothing else. It isn't an option for everybody, really. You can build all sorts of projects on it, from a server daemon, to a casual game on mobile through the usage of Haxe NME / openFL. Things have moved on, so to say.
- lucian1900 13y agoIt's rather bad compared to Haskell or (Oca)ml, in fact it's bad even compared to Scala.