4 ms·
I know why typescript "succeeded", but always wonder what kind of web we would have if infact Haxe had become more popular for web in the early days. My guessti
by phplovesong 9mo ago
I know why typescript "succeeded", but always wonder what kind of web we would have if infact Haxe had become more popular for web in the early days. My guesstimate is we would have had bundlers in native code much, much earlier, and generally much faster and more robust tooling. Its only now we see projects like esbuild, and even TS being written in a compiled language (go), and other efforts in rust.
Also it would have been interesting sto ser what influence Haxe would have had on javascript itself
- llmslave3 9mo agoOr Lua... :>
- forgotpwd16 9mo agoThen comparison will've been Haxe to TypeLua rather TypeScript. Typing addition seems inevitable.
- Tade0 9mo agoSame could be said about Java Applets or Flash and, in a way, about Elm. We've been there and this approach doesn't work. The creators of TypeScript realized early on that people don't need yet another ecosystem, but a migration path that won't pause development.
- phplovesong 9mo agoThats true, but comes with a cost. TS has become an incredibly complex language, even it only provides types. Thats being said is will always lack features as it only "javascript". Haxe has a more robust, but simpler typesystem, that comes from ocaml. Haxe also compiles to C++ so making native tools would have been a breeze. TS sits at the top chair, but there is many "better" options out there, like Elm (even its kild of a dead languge) and ReScript/ReasonML etc. TS is good, but will never be a perfect language for javascript. It will always be a mediocre option, that is growing more and more complex in every new release.
- Tade0 9mo agoYes, amazing language - I recall having a look at it in 2013 when I was scrambling for a replacement for Flash (also amazing platform). Shame it doesn't solve the problem at hand. Hardly anyone cares TypeScript isn't perfect when they can migrate their (or anyone else's) terrible, but business-critial JS library to TS and continue development without skipping a beat. For the same reason ReasonML took years to overtake fartscroll.js in the number of stars on GitHub. A huge part of TS's complexity is there so that library authors can describe some exotic behaviours seen normally only in dynamically-typed languages. When you're writing an app you don't need the vast majority of those features. Personally I regret every usage of `infer` in application code.
- Timon3 9mo ago> For the same reason ReasonML took years to overtake fartscroll.js in the number of stars on GitHub. Wow, that's a fascinating statistic! Certainly puts the popularity delta into a different light. On a separate note, the fartscroll.js demo page[0] no longer works since code.onion.com is no longer accessible. Truly disappointing. Luckily their release zip contains an example.html! [0]: https://theonion.github.io/fartscroll.js/ https://theonion.github.io/fartscroll.js/
- Tade0 9mo agoWell, it was actually slightly less than two years: https://www.star-history.com/#theonion/fartscroll.js&reasonml/reason&type=date&legend=top-left https://www.star-history.com/#theonion/fartscroll.js&reasonm... I remember the hype back when it was released, though. You don't hear much about it any more.
- phplovesong 9mo agoIs this a serious take? Do we now measure popularity based on github stars? Thats sort of like measuring how good software is by the amount of LOC.
- skybrian 9mo agoI assume you meant that the TypeScript compiler is being rewritten in Go. (At first I read it as something entirely different.)
- phplovesong 9mo agoIndeed i ment the compiler being rewritten from JS->Go With Haxe this would never have been a problem, as the compiler (written in ocaml) was always fast as anything out there.