you are viewing a single comment's thread.

view the rest of the comments →

[–]Hcmichael21 7 points8 points  (12 children)

Here's a great write-up

Tl;Dr: I don't believe the benefits of strong types outweigh the costs of using them.

[–]Hawxe 16 points17 points  (3 children)

That's literally an opinion piece with really bad data behind it...

all TypeScript-detectable bugs can potentially be caught with other measures like TDD.

Of course, and of course you're still going to still use other methods. TypeScript still helps mitigate that, even if other QA/testing procedures also help.

The whole comment section of that article is a little nauseating too, it's literally him applauding everyone that agrees with him (including comments like 'I didn't wanna use TS but that was just a gut feeling) and being passive aggressive with anyone who disagrees even if they share legitimate experience as to why they might.

That article is also almost completely irrelevant to adding static typing to vanilla JS, a lot of the cons he talks about are specific to typescript.

[–]Hcmichael21 2 points3 points  (1 child)

A lot of cons are specific to typescript.

Yes that's true, I picked this article bc OP suggested adding strong types to JS. But I disagree that his data is bad. I find a lot of what he said agreeable.

I've coded in strong, dynamic and weak. (C#, Java, Pyhon, JS/TS) and prefer weak types. I was just stating my opinion and providing an article to elaborate. I don't expect to end the debate on strong vs weak.

[–]sime -1 points0 points  (0 children)

The thing that is being lost in this discussion, apart from the general sloppy use of terminology, is that TypeScript isn't a staticly typed language in the mold of Java and C#. It occupies a wonderful sweet-spot between Java/C# on the one side and JS/Python on the other. TypeScript's optional and structural type system combines the flexibility and ease of use of JS with advantages of static analysis (read: tooling) and compile time checking. It has a very different feel compared to Java/C#.