6 ms·
Haxe is strange in that it seems to be very well known among developers but relatively very few actually use it. I guess it's an old project with very specific
by jondubois 8y ago
Haxe is strange in that it seems to be very well known among developers but relatively very few actually use it. I guess it's an old project with very specific use cases; like building certain kinds of multi-platform apps.
It's nice to see a project with such a dedicated community.
It's a shame that most developers started using TypeScript instead of Haxe; that seems like a missed opportunity. TypeScript was pretty painful to use in its early days; it shows the importance of positioning and marketing.
- sdegutis 8y agoWell TypeScript also had a huge corporation with infinite budget and a large full time team of contributors and evangelists which probably helped adoption.
- simion314 8y agoExactly, many of the new trendy languages have a corporation behind that can with money and by association get the language known.
- larsiusprime 8y agoExactly this; frankly, I think it's amazing that Haxe is as relatively well known as it is given it's humble origins at a once obscure* French game development studio. It's not a surprise at all that the likes of Microsoft and Google and Mozilla are able to promote and push new languages to significant widespread adoption. *Not so obscure anymore; Motion-Twin is well known for the hit game Dead Cells, and their former employee, Nicolas Cannasse, who is credited with inventing Haxe, went on to found his own studio with its own successful games (Northgard especially)
- m_sahaf 8y agoCounter-example: Dart. If corporate support is a definite factor, Dart would have taken off way earlier than now. A bigger factor in TypeScript's success would be the ability to gradually migrate the projects as it's a superset of JavaScript. How do you start migrating? Flip the file extensions from .js to .ts with loose compiler options, then gradually add typing as the options are tightened. It's factors like these that drive spread of language, not "huge corporation with infinite budget and a large full time team of contributors and evangelists." Dart had no short of those and still not much accepted.
- redisman 8y agoHas Dart taken off? I think most people recoiled in horror when they saw the early-days "hello world" turn into millions of lines of generated code.
- Kaveren 8y agoNot that I'm aware of, no. I don't know, but it seems to me like WebAssembly is more promising for conveniently bringing all programming languages to web applications, rather than languages like Elm or Dart whose standard implementations compile to JavaScript and are designed only to program web applications.
- pjmlp 8y agoOnly inside Google on the Ad Words team that kind of rescued Dart after the Chrome team stop caring about Dartium. Now the Flutter project is Dart's last hope to keep it relevant outside Google. It remains to be seen how serious Google is about Flutter, as the Android team only gives political correct answers when inquired about Flutter vs Android.
- simion314 8y agoDart had some other downsides, like you needed Java I think and many developers have an irrational disgust for Java(I hope I remember right) There are other languages pushed by a big corporation that fail so having the big corporation is a necessary but not sufficient condition.
- haxiomic 8y agoI've been using TypeScript professionally for over 2 years now and compared to writing JavaScript it's indispensable but for all my personal work I prefer haxe -- My love list -- - The generated JavaScript is usually faster and smaller after compile-time optimizations, for example, objects can be inlined so they become stack-only and don't hit the GC. Example: https://try.haxe.org/#0F337 https://try.haxe.org/#0F337 - It's expressive (but familiar); nearly everything is an expression and switch statements support pattern matching: var animal = { species: "cat", breed: "bengal", age: 15 }; var friendliness = switch animal { case { species: "cat", breed: "russian-blue" }: 100; case { species: "cat", breed: _, age: age } if (age < 5): 300; case { species: "dog", breed: "golden-retriever" }: 1000; default: -1; } - Fast compile times (for sizable projects you get hundreds of milliseconds rather than seconds – and faster still with incremental builds enabled) - No need for separate tools like webpack: > You can perform arbitrary compile-time behavior (like processing and embed assets or generating code) by marking haxe code as a macro > Generates a single bundle by default > Dead code elimination built-in -- The downsides -- - Not many people know about it so it's usually better to stick with TypeScript with clients - The smaller community means if you might have to be more hands-on, both in learning haxe and when it comes to working with haxe libraries – i.e. fixing a bug upstream rather than waiting for the community to fix it - The package manager is more bare-bones than npm (personally I _much_ prefer this – I find `npm` and `node_modules` can be a nightmare to work with) but there's a general ask in the community for more advanced package management
- segmondy 8y agoI really disliked Javascript and swore of it no matter how much it took over the world till typescript. If typescript is not enough, I'll use another language go/python and use web assembly to generate js. js is a byte code to me. However, the advantage of typescript is that I can pull in a js lib and use it.
- haxiomic 8y agoSame with haxe, you can use an untyped js lib with the `untyped` keyword [0] or use an extern to enable strict typing[1] (like TypeScript's d.ts) [0] https://haxe.org/manual/target-javascript-injection.html https://haxe.org/manual/target-javascript-injection.html [1] https://haxe.org/manual/target-javascript-external-libraries.html https://haxe.org/manual/target-javascript-external-libraries...
- platz 8y agoI like typescript. I also like purescript - which I like to think of as 'typescript, where the types have teeth' (I like that I can also pull in a js lib and use it)
- coldtea 8y ago>Haxe is strange in that it seems to be very well known among developers but relatively very few actually use it. So like Lisp, Scheme, Haskell, ML and so on?
- platz 8y agoThe first law of programming language intersectionality is that the interesting things will always be happening in languages other than the one you actually use.
- jplayer01 8y agoI'd say one of the issues with Haxe was always tooling. I don't know how it is now, but when I was looking at it a few years ago, debugging it wasn't really possible.
- haxiomic 8y agoThese days you can use the debugger in VSCode[0] with the eval target (which is used to execute haxe directly). When writing platform specific code you can use the platform's debuggers, for example, you can use sourcemaps to debug the JS target [1] [0] https://github.com/vshaxe/eval-debugger https://github.com/vshaxe/eval-debugger [1] https://haxe.org/manual/debugging-source-map-javascript.html https://haxe.org/manual/debugging-source-map-javascript.html