This post is taken from my blog so be sure to check it out for more up-to-date content 😉
JavaScript is great for a number of use-cases. It's prett...
For further actions, you may consider blocking this person and/or reporting abuse
I can only speak for TypeScript and Elm. And I must say that for those of you that really value the ergonomics of the language you use, Elm trumps JS & typescript. Not only do you not get runtime exceptions in Elm, but reasoning about complexity in Elm is much easier given the explicitness of its type system. In typescript you do not have a
Maybe
type which makes the notion of nullable objects explicit. In typescript you do not have aResult
type, which makes failure situations explicit as well. All these additional types might make it seem like a burden to deal with, but what it actually does is force you to reason about all the various states of your program ahead of time instead of after you release and realize your users are looking at a runtime error caused by an edge case you didn't think about.Edit: Spelling :)
to
is a better example
I wish TypeScript wasn't so shy of adding syntax that actually outputs something.
But at least on the typechecking side
as const
might be coming as early as 3.3, andopaque
types finally seem in the works as well.Maybe it will go through a second rebirth and finally stop me looking for alternatives for the general small-scale case.
Typescript seems the best , as with typescript you are extending your js knowledge and organising it , unlike other's where you are re-learning a whole new language and TS code can be easily used with any existing js project , be it server side nodejs or client side jquery and has a strong community
Have you used TypeScript on large (10,000+ LOC) projects? It works well when you don't have to use 3rd party packages (React, lodash, etc) because the run-time code for these packages is completely separate from the types. This means that close to 90% of the time, the types are wrong. Which leads to runtime exceptions becasue the typesystem is a completely inacurate representation of the runtime characteristics of the program.
Also, given that you are most likely interfacing with JS, a developer is prone to use the
any
type way too often, which ultimately defeats the purpose of writing typescript in the first place.Have you considered that maybe learning a language completely different from JS might help you become a better JS developer? Haskell and Elm are good examples of this. They are radically different from JS and force you to think about your programs in a completely new way. But this thinking can be applied back to JS to help you write more resilient code.
Edit: Check out this blog post where I get into a bit of detail on TypeScript's flaws dev.to/_gdelgado/the-economics-of-...
There's also WebAssembly
By the way, "compile-to-JS languages" is probably a better way of saying "JS compilables"
Other than that, nice list! 👍
I'm thinking of starting with Kotlin, a coworker showed me some code and it looks an interesting language.
+1 for Haxe, it's one of my favorite languages to use.