
Problems with TypeScript in 2020 - execute_program
https://www.executeprogram.com/blog/problems-with-typescript-in-2020
======
DaiPlusPlus
TL;DR: “TypeScript sucks because JavaScript sucks - namely buggy development
file-watchers and npm - and some @types packages for more obscure npm packages
are inadequate.”

If that’s the worst people can levy at TypeScript I’d say it’s a pretty danged
good language.

What I hate about TypeScript is that it’s made me feel that all other
programming languages’ type systems are inadequate in comparison (union and
intersection types, Utility types, immutable and read-only views of existing
objects, type guards for duck-typing, etc).

~~~
klysm
As a relatively new programmer, I’m kinda of baffled it took up to now to have
these features in mainstream programming languages, but I certainly lack a
huge amount of historical context.

~~~
WorldMaker
To some extent a lot of these ideas are still "new", comparatively, to type
systems.

It's also easy to argue that Typescript (and Flow, not to ignore its
contributions to the space) happened upon exactly the right sort of
evolutionary conditions to both need a lot of the complicated features and
present them in such a way that they appealed to a "mainstream" audience: a
very dynamic base language with a giant corpus of highly varied real world
usage, and a growing need for practical "taming" for large real world
applications by large corporations (with vested programming language
interests).

It's a credit to Typescript (and to Flow as well) that a lot of the complexity
in its type system, often designed as best as it could to handle describing
the complexity of real world Javascript usage, seems after the fact as
"perfectly natural" enough that now in retrospect people start to wonder why
more languages don't adopt the same ideas. Sometimes the simple answer is
"because they weren't forced to in order to scratch a present need". As people
have access to the tools it becomes easier to see "oh, this complex thing that
solves this need over here becomes a useful thing to better these nice-to-
haves over there".

------
pjmlp
My path to happiness is to only use TypeScript in projects that are built from
the ground up to use it, otherwise I rather stay with JavaScript than dealing
with library integration issues.

