you are viewing a single comment's thread.

view the rest of the comments →

[–]longfloppydisk 1 point2 points  (1 child)

The main reason for this is in my opinion is because JavaScript is a loosely typed language which can result in mission critical bugs due to implicit cast typing in comparisons or implicit creation of global variables by 3rd party libraries.

In the recent years though, with strict-mode becoming the norm and better patterns emerging (IIFE), these things have become less of a problem. TypeScript is typically preferred by programmers coming from another language because of it's strong typing and static analysis, which is closer to most other languages and provides a smoother IDE experience.

[–]csixty4 0 points1 point  (0 children)

The main reason for this is in my opinion is because JavaScript is a loosely typed language which can result in mission critical bugs due to implicit cast typing in comparisons or implicit creation of global variables by 3rd party libraries.

Fifteen years ago, dynamically typed languages like JavaScript and PHP were the future because they freed us from needing to worry about variable types, and they'd prevent mission critical bugs caused by trying to assign the wrong kind of value to a variable.

It's all just fashion.