DEV Community

Discussion on: Fault tolerance on the web

ecyrbe profile image
ecyrbe • Edited

What bold assumptions. A tool is a tool and it always fullfill a purpose.
You achieved to tell your peers that if they use typescript or even like using it, or let bugs sleep through, they are bad developers ? really?
Professional environnement ? Catch bugs early ? Keep your maintenance cost low ? Catch a phrase?

Talking about tdd vs typesystem when one is about runtime checks vs build time checks... Maybe i should throw my linter away, there's ttd!
Obviously, a type system is here for a purpose and it's indeniable success means it's usefull to some. Maybe only to those who realise they prefer climbing a building with a security belt? If that means they are bad climbers in your eyes, at least they are still alive. Meaning their project will still be maintainable and evolve 5 years from now.

joelbonetr profile image

As long as you can check types whenever you like or need with JS and the only feature that "survived" JS evolution from TypeScript is strong typing, why would you like to have this throwbacks?

It limits what you can do with JavaScript and obscures it's strong sides while providing a fake peace of mind.
Any network calls, system libraries, platform-specific APIs and non-typed third-party libraries have no way of communicating with TypeScript

You are confusing having a security belt with always needing this security belt.
Do you need a security belt to walk through the streets from your home to the supermarket? Do you need a security belt to go from your kitchen to your bathroom?

Whenever you need it you can check it is here with typeOf.

I can understand many people that like TS is because they come from Java or C# and it looks more like what they learned, and that is difficult at the beginning to code into JS which has some things to take care of such Async, load orders, etc -depending on the project or implementation- , also being a multi-paradigm language does not help newbies.

Using JS as OO language only and with strong types using TS is most of time a lack of previous analysis of what is the best architecture, paradigm or design you can apply to your solution.

You can simply take a try and develop the same with and without TS, the result would be that in JS you end up with better third-party compatibility, ensuring your app process and in less time -that's the results from 3 iterations we did in the past to take a decision about using TS or not on a much bigger project-

I bet you feel a bit offended with my conclusion, it's not some kind of insult, it's a push for you to make some kind of deep analysis and empiric test to see if it's really a must or it's only some kind of unneeded sugar.

There's no real concern about types if you can discern whether those type checks are strictly needed.

At the end... what will you say of a man who walks it's 5 Kg dog on a flat walk-through thrice a day while wearing a security belt?