Echo JS 0.11.0

<~>
asmyshlyaev177 1560 days ago. link 0 point
Typescript gives you false sense of protection from errors and bad code.
It's prevents simple errors, but it makes code more messy and require spend time on learning and debugging TS itself.
When you learn further better to know specific of JS(or any language you coding on) and plan better architecture it will bring more benefits.
Simple stuff like SOLID principles, tests and experience more important.

But it make sense for many companies those hire juniors and replace them often, in that case better to have at least some guarantee that code works.

Replies

badsyntax 1559 days ago. link 0 point
I agree there will be extra time required to learn TypeScript and construct your types correctly. Saying that, I find the TypeScript type system _not that hard_ to learn. Yes there will be an initial learning curve but it's easier to learn than other type systems (eg flow). 

Once you've setup your types correctly you can argue it saves you time in the long run, especially when it come to refactoring. Also consuming typed packages is easier, you don't need to refer to the docs to understand expected data types or parameters, the IDE will tell you how to consume 3rd party code. 

TypeScript should complement and not replace existing good practises.
asmyshlyaev177 1559 days ago. link 1 point
"Yes there will be an initial learning curve but it's easier to learn than other type systems (eg flow)."
Flow is terrible, i remember my experience with it. Learn 1 unnecessary thing to easier learn even more useless stuff, strange idea.

I have pet project on TS, at first it was fine. But after some time code become too complex, and TS only makes it more complicated.
Instead of spending time on code design and proper tests, i spent it to fight with TS.

Can keep only limited amount of things in mind, there already too many stuff to know, remember and learn in JS ecosystem. 
At first TS protects you from simplest errors, but consumes too much attention for it. This time can be spent much more efficiently.
it is simply not worth it.

For simple errors i have unit and integration tests, no replacement for it anyway, and tests also helps to see big picture and what can improve in code design.
80% of problems is bad architecture, not knowing specific of language or misuse of other libraries. TS can't help with it at all, only add another thing that i should worry instead of code.