by RussianCow · 11y ago · 0 comments
I like the idea of this approach way more than the one that projects like Xamarin take (build a common runtime on top of each platform) because you don't incur any runtime overhead, and debugging would (in theory) be much easier because you can just debug the native language instead of needing to understand the extra VM layer on top. As a bonus, with Haxe you can also target the web, which you can't do with Xamarin/RoboVM/RubyMotion/etc.
Has anyone tried anything like this (not necessarily with Haxe) and had success with it?
[0]: https://github.com/ralcr/swift-target
Edit: Wording and clarification, added bit about targeting web.
Other uses for Haxe are the JavaScript target which a number of companies are using extensively in the same way you would be using typescript/coffeescript.
Could you speak to the specific "warts" you found while using it? I'm genuinely curious.
The sort operation is not guaranteed to be stable, which
means that the order of equal elements may not be retained.
For a stable Array sorting algorithm,
haxe.ds.ArraySort.sort() can be used instead.
Every platform has its own gaps in the API. This is evident in this submission - after the author translated his JavaScript he then had to fix his haxe to work within the subset available to C#.OpenFL isn't a mature platform and their releases are rushed and buggy. If you download and install <older OpenFL> their setup process will install the newest version of dependencies and their incomplete documentation will leave you to figure out what versions are actually compatible. Gestures are a pain in the ass with immature and incomplete libraries.
The one thing that makes it worth using - barely - is the decade and a half of ActionScript experience I also have.
You even make it sound like that was a common occurrence due to a deliberate decision on part of the development team to not fix that alleged source of crashes, but rather refer to an alternative in the documentation.
You should clarify that you haven't made this experience, and that no one you know or have heard of ever has.
You seem to have no idea how unlikely it is that the various Array.sort implementations (they're usually provided by the respective target platforms, of course) all have some bug that leads to crashes, moreover, you seem to be unaware that most target platforms provide such basic APIs, which in turn shows how little you know about Haxe.
As the documentation already explains, "unstable" in the context of a sort function is about the order of elements that are equal from the perspective of the comparison function. That's basic CS terminology. It's not about crashes, and it's not about bugs in Haxe or the respective target platforms.
You simply misunderstood, but you keep insisting. Which sheds some light on the overall quality of your comments about Haxe here.
Also, if I were to use Haxe for mobile development, it wouldn't be through OpenFL; I would use the native APIs of each system and just write a thin wrapper in Haxe that's common for all platforms. I just want to reuse code, not adopt a completely separate UI toolkit.
I really don't mean to be condescending, but are you interpreting "stable" to mean "crash free"?
If you're just looking for multi-platform stuff, that's almost a minimum requirement now: unity3d, unreal engine, xamarin, javascript etc.
Haxe has the ability to integrate much more cleanly across all of these platforms imho.
This is pretty much the approach that Google use with Inbox, except they used j2objc instead of RoboVM.
I think the focus is going to be on generating objective c, rather than swift. Although, that's the entire extent of my understanding.