DEV Community

Discussion on: TypeScript is a waste of time. Change my mind.

Collapse
 
neurosys profile image
neuro sys • Edited

In truly statically typed languages such as C and C++, different variable types are stored differently in memory. This means that it is very difficult, borderline impossible to accidentally store data of the wrong type in a variable.

This is not correct for C, there's no run-time information about types in C, and you are allowed to write anything anywhere in process memory. Lack thereof is one of the reasons why it performs faster than those with runtime checks.

As for readability. It is harder to read a piece of text when it contains more information, but it is easier to understand the meaning. Pure JS may seem easy to read, but it's because it's lacking information that is often useful to understand the code.

JavaScript is similar in its success as much as BASIC was in 80s, I think, it allowed more people to learn programming. But it's not necessarily the best way to be effective and manage complexity.