TypeScript really hits the sweet spot for me. A good type system (real union types, which Kotlin lacks), barely any special syntax to remember but still powerful enough. I do want nominal typing sometimes, though.
Although I must admit that I wouldn't use TypeScript in the backend for the projects we work one (but I do for my personal projects).
Re:Kotlin 1.4
by tejinderss on Tuesday August 18, 2020 @05:34AM
(#24196785)
> Although I must admit that I wouldn't use TypeScript in the backend for the projects we work one
Can u elaborate on that? Why is TypeScript not suited for some projects?
For us particular, we heavily rely on fat frameworks like Spring (and sometimes Java EE) and there is nothing like that in TypeScript/JavaScript world. It boils down to not having classpath scanning, reflection and annotations in TypeScript, I guess. I don't want to defend these frameworks, though, they certaintly have their flaws, but it is what we use and it is often also what is teached in Germany.
We also follow a domain-driven design approach for which we not yet have found a good way to implement in TypeScript (at least not on the "tactical" level).
Edit: Also, people don't grok asynchronicity ;)
last time I was working in Typescript (a year) ago, the date/time libraries were still disappointing and precision math libraries were very way too cumbersome. Both are well solved problems on the JVM and in other languages.
Luxon makes for a good date lib stop gap while tc39 works on something built-in that is (hopefully) a bit nicer.
As for typescript, it's a nice step up from javascript but IMHO more of a gateway drug to other languages (like Kotlin).