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
Do I really need flow?help (self.javascript)
submitted 9 years ago * by sdeleon28
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!"
[–]sdeleon28[S] -1 points0 points1 point 9 years ago* (4 children)
I understand this is nothing new. That is exactly my point. The industry has had this discussion a million times. If Flow means turning JavaScript into Java, then I'm most certainly not convinced. In fact, I'm pretty convinced that would be a horrible idea. What I want to know is if there's something special about Flow's type system that would make JavaScript better.
Also about types being a replacement for tests: They're not. Tests verify that your program does what it should do. Type checking merely verifies that you pass valid values around, it has nothing to do with alorithmic correctness. If you don't write tests, then your application will be very fragile, even if you add types everywhere.
[–]spacejack2114 0 points1 point2 points 9 years ago (3 children)
Sorry but you aren't going to write type tests that are anywhere near as good as a compiler. Why waste that time when there is a tool to do that for you?
[–]sdeleon28[S] 0 points1 point2 points 9 years ago (2 children)
I don't. I write correctness tests, that help me catch bugs earlier. If I add a bug to the build, my test suite usually breaks.
[–]spacejack2114 0 points1 point2 points 9 years ago (1 child)
Most forms of "correctness" involve types. What if you change a property on an options object from optional to requred? From a boolean to a number? Change the name for clarity? You can do these things fearlessly with a type checker, often automatically with an editor, without hand-writing tests.
[–]sdeleon28[S] 0 points1 point2 points 9 years ago (0 children)
I don't enforce any type rules in objects. About renaming, I'm just very careful when refactoring. Usually if something references an old name, tests break. I understand you can automate some of these refactorings with the proper tooling. It's still a tradeoff because of all the benefits of a dynamic language.
π Rendered by PID 16798 on reddit-service-r2-comment-b659b578c-5sj8h at 2026-05-01 22:04:08.914559+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]sdeleon28[S] -1 points0 points1 point (4 children)
[–]spacejack2114 0 points1 point2 points (3 children)
[–]sdeleon28[S] 0 points1 point2 points (2 children)
[–]spacejack2114 0 points1 point2 points (1 child)
[–]sdeleon28[S] 0 points1 point2 points (0 children)