by phplovesong · 1y ago · 0 comments
Its a bummer haxe did not promote itself more for the web, as its a amazinlgy good piece of tech. The languge shows age, but has an awesome typesystem and metaprogramming capabilities.
That said, haxe 5 is on the horizon.
You lose all type benefits of libraries that are written in TS.
And yes, i know that is what made it popular.
I've deployed projects in Elm, Scala, Clojure, Purescript and TypeScript has many great qualities that the others don't have.
It's an incredibly powerful language with a great type system which requires some effort in understanding, (e.g. 99% of candidates don't even know what a mapped type is, it's written in the docs...) and minimal discipline to not fall in the js pitfalls.
On top of that you have access to tons of tools and libraries, which alternative ecosystems either don't have (e.g. no compile-to-js language) or have to interoperate with at js level (anything from Reason to Gleam) anyway.
Beyond that, there's other important considerations in choosing a language beyond its syntax/semantics and ecosystem, such as hiring or even AI-friendliness.
Stricter TS is absolutely a valuable effort to chase.
The TS sweetspot was (imho) somewhere around 1.8-2.0 era. These days you can run doom in the typesystem.
I cant say about hiring, as i dont hire a dev that knows language X, i hire engineers that know the ins and outs of how software should be written, and know when to pick Go, when to pick ocaml and when to go with C/Rust.
Also i would never use 99.9% of npm packages (js or ts) so i dont really care that much.
As an example writing typeheads for reasonml is not really that hard, as a benefit you know exactly what parts you use.
Also i dont use AI, and we dont accept any PR that are videcoded.
Please don't ask shit like that during interviews. For the love of god.
The examples on the JVM and CLR got it through, targeting the same bytecode, and Swift even if imposed from above, also had to make interop with Objective-C first class, and is now in the process to do the same for C++.
Turns out adoption is really hard, if a full rewrite is asked for, unless someone gets to pay for those rewrites, or gets to earn some claim to fame, like in the RIG and RIR stuff.