I work with Kotlin at my day job but am also active in the Haxe open source community. I really like both languages, and I don't think that Kotlin is objectively better than Haxe.
In practice, there are things about Haxe I miss in Kotlin, but also things about Kotlin I miss in Haxe. Just to name a few examples:
- I'm missing Haxe's pattern matching and macros in Kotlin
- I'm missing Kotlin's level of IDE support and robust null safety (with ?: and ?. operators) in Haxe
(Haxe does have experimental opt-in null safety, but it doesn't seem production-ready yet)
"there’s no equivalent project to DefinitelyTyped" - no, but these days you can auto-convert those TS type definitions to Haxe externs automatically! :)
Haxe macros are very powerful, but not needed for that particular issue - the compiler supports inlining of methods and even constructors (which is useful for iterators in particular): https://haxe.org/manual/lf-inline-constructor.html
For 5 of the targets, debugging directly within the Haxe sources is supported with different VSCode debug adapters (well, JS just uses source maps). If your code is written in a target-agnostic way, you can even switch to a different target with better debugging support temporarily.
Other than that, if really you need to debug some target-specific issue on a target without debugging support, there's usually still the option of debugging the generated code.
Fyi, at this point the Neko VM has more or less been replaced by its spiritual successor HashLink (used by games such as Northgard and Dead Cells). It achieves better performance by being a strictly typed VM. It also has better tooling (breakpoint debugging in VSCode, profiling).
TypeScript makes a number of compromises to achieve optimal JS compatibility. Haxe doesn't have this goal since JS is just one of its many targets, and this shows in a number of design decisions (everything-is-an-expression, ADTs and pattern matching, etc).
There are Electron applications written in Haxe too (via the JS target and Node + Electron type definitions), such as these two level editors for games:
In practice, there are things about Haxe I miss in Kotlin, but also things about Kotlin I miss in Haxe. Just to name a few examples:
- I'm missing Haxe's pattern matching and macros in Kotlin
- I'm missing Kotlin's level of IDE support and robust null safety (with ?: and ?. operators) in Haxe
(Haxe does have experimental opt-in null safety, but it doesn't seem production-ready yet)