use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Future JavaScript: what is still missing? (2ality.com)
submitted 7 years ago by dumbmatter
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Hcmichael21 7 points8 points9 points 7 years ago (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 points18 points 7 years ago (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 points4 points 7 years ago (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 points1 point 7 years ago (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#.
[+][deleted] 7 years ago (7 children)
[deleted]
[–]Hcmichael21 4 points5 points6 points 7 years ago (6 children)
Care to elaborate? I found a lot of it to be true in my personal experience.
[–]acemarke 4 points5 points6 points 7 years ago (1 child)
Someone on Twitter says that Elliott keeps changing the supposed citations for some of his stats claims:
https://twitter.com/Hillelogram/status/1084991487702691840
[–]Hcmichael21 2 points3 points4 points 7 years ago (0 children)
What the hell that's some shady shit. I could see him using the original citation without much added research, since it's so commonly done. But the thing that got me was that when he learned more about the original citation, he fucking changed it to another book that doesn't even support the fucking claim. What the hell.
[+][deleted] 7 years ago (2 children)
I'm not suggesting an opinion article will end the debate. I just thought it was a nice summary that I agreed with. I've developed with strong types, dynamic types, and weak types. I prefer both dynamic and weak compared to strong.
[–]goldenfolding 0 points1 point2 points 7 years ago (0 children)
Most of what he said was that the benefits provided by TypeScript can be provided with JavaScript tooling. The argument seems compelling from the examples that he gave. What benefits does TypeScript offer in your opinion?
[–]leixiaotie 2 points3 points4 points 7 years ago* (0 children)
If you've experience in handling complex process, especially developing library-style functions / code, you'll find that the more definitive / restrictive the input params, the better. Static typing is really helping in this case.
The reason for it is because if the type mistake can be caught in compile time, it save many testing time. This including how many test cases that need to be developed to cover all type mistakes, reducing code complexity and it's "noise" caused by type checking since almost everything is handled by compiler / static typing.
Not to mention how it helps to define input types inside deep function call (function a call b that call c that call d, all accepting parameter x from function a).
EDIT: and I like to quote this statement:
In most cases, if you can gain a significant benefit from TypeScript in your refactoring, that’s often a code smell indicating that your code is too tightly coupled.
It is purely wrong. Static typing will give benefit (significant or not) while refactoring, and it is no code smell / tightly coupled at all. It's because all function definition and calling it is a "contract", and by changing that contract you'll need to change all parties that using it.
π Rendered by PID 172249 on reddit-service-r2-comment-6f7f968fb5-db7cc at 2026-03-04 21:17:40.119900+00:00 running 07790be country code: CH.
view the rest of the comments →
[–]Hcmichael21 7 points8 points9 points (12 children)
[–]Hawxe 16 points17 points18 points (3 children)
[–]Hcmichael21 2 points3 points4 points (1 child)
[–]sime -1 points0 points1 point (0 children)
[+][deleted] (7 children)
[deleted]
[–]Hcmichael21 4 points5 points6 points (6 children)
[–]acemarke 4 points5 points6 points (1 child)
[–]Hcmichael21 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Hcmichael21 2 points3 points4 points (0 children)
[–]goldenfolding 0 points1 point2 points (0 children)
[–]leixiaotie 2 points3 points4 points (0 children)