DEV Community

Discussion on: Why I love Javascript

 
merri profile image
Vesa Piittinen

I disagree. Not every codebase requires TypeScript. Strict typing is too often a waste of time with a negative ROI. Especially if you do your unit tests! They cover far more cases of bugs than TypeScript can ever catch.

I know I'm in the current minority of about 20% of JS devs who don't want to use TypeScript, but popularity alone shouldn't make you not think about things. Such as "does this thing really provide me value for this particular codebase?"

Thread Thread
 
himujjal profile image
Himujjal Upadhyaya

Yes. Its a matter of opinion and you might have a different one.

TypeScript saved me a lot of time when using React and Redux. Passing data around is not a child's play. Then again even in unit tests you are supposed to write tests for type checking. A lot of that is reduced because of you using TS.

In my opinion, I consider writing extra types is a tradeoff for maintainable and scalable code. Many a times we don't even have to refer to the documentation of a library. The types themselves give an idea about what you need to pass (I know JSDoc exists).

JSDoc is again messy code (it seems that way to me). TS is cleaner code.

TypeScript would have been a lot better again if it also included runtime type checking (hegelJS like).

Admit it. Typechecking saves time. It's a trade off

Thread Thread
 
merri profile image
Vesa Piittinen

You have a very bad attitude on this and due to that fail to be open to differing opinions. Instead you keep on pushing that you are right and I should change my opinion because of that. Why is that?

What if I'd end up with the same kind of style:

"Admit it. Being open to and respectful of different opinions makes you a better person and a better developer. There is no tradeoff to that."

Does that make you feel good? Or would you just get angry and defend your opinion no matter what?

Thread Thread
 
himujjal profile image
Himujjal Upadhyaya

I am sorry if my attitude was too pushy. Never intended it to be that way। Peace 😊✌️