Coding since 11yo, that makes it over 30 years now ~~~
Have a PhD in Comp Sci ~~~
Love to go on bike tours ~~~
I try to stay as generalist as I can in this crazy wide place coding is at now.
My 2c is that Javascript has a wide array of traps for inexperienced devs to step into, and many/most of these are no longer issues when the dev is working in Typescript.
For example,
what does this refer to at any point in time?
type coercion rules causing problems
expecting an undefined from a system function that returns null
Even just the fact that object keys are reported as strings is enough to trip a coder up...
Typescript will let you know that indexForTop is a string.
If coding is like putting a new roof on a house, having better static analysis tools, like type safety or good linting, is like setting up a better scaffold around the house before you start.
It is a pita in many ways but I'd think (apples to apples) that novice roofers need that safety more than the experienced ones.
My 2c is that Javascript has a wide array of traps for inexperienced devs to step into, and many/most of these are no longer issues when the dev is working in Typescript.
For example,
this
refer to at any point in time?Even just the fact that object keys are reported as strings is enough to trip a coder up...
Typescript will let you know that
indexForTop
is a string.If coding is like putting a new roof on a house, having better static analysis tools, like type safety or good linting, is like setting up a better scaffold around the house before you start.
It is a pita in many ways but I'd think (apples to apples) that novice roofers need that safety more than the experienced ones.
Correct