DEV Community

Discussion on: Static Typing: a Personal Journey

Collapse
 
imthedeveloper profile image
ImTheDeveloper

Thanks for writing this. I really loved the article and to be honest your journey makes perfect sense. Whilst I've been an on / off developer for some years amongst other jobs I've spent a lot of time around Javascript and you are right, there is definitely something good to be said about static typing. At first, the flexibility and love you get from the lack of constraints are brilliant, but I have been hit so many times with silly little errors which something like typescript could have picked up earlier.

As you have mentioned, it's horrible to feel as though you are going through the motions just to satisfy a higher level of automation. However, when working on large projects I think I've started to feel the itch in my brain saying "god this would have been perfect to start trying static typing". Let's face reality, we are clever folks being in development work. It's the engineering, mathematical and creative parts of your brain firing off constantly as you develop your code. It's the most fulfilling job anyone could do (in my opinion!), there's a great level of satisfaction from making things just "work". However, we are human and whilst the brain is a brilliant component we can only utilise a small percentage of that to keep track of everything we develop. It would be naive to believe that you can remember every facet of your code and ever use case that could run through your functions. For me, this is why static typing really offers benefit.

Automation is augmenting my skills, it is not blindly replacing gaps in my knowledge. I knew I needed to assign a variable or add a parameter when I was writing my function out, but can I be damned if I remember that fact 2 years later when building on top of my old application!

As mentioned - I'm yet to dive into javascript static typing, but I've used it in other languages. Heck even VBA forced static typing. Your post has just prompted me to re-ignite my interest and I think for 2018, this goes on my to-do list.

Collapse
 
bmakuh profile image
Ben Makuh

Wow, this makes my day! I love that it inspires you to try it out!