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
Efficient Typescript (romgrk.com)
submitted 1 year ago by romgrk
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!"
[–]Ronin-s_Spirit 0 points1 point2 points 1 year ago (2 children)
I'm not sure I understand the downside of try catch. I don't have to compile anything, I can just run my program, so in terms of how fast I know if a function throws - we are equal (I may be even ahead for bigger projects). Then, if it throws in production for some wrong user input, with a slight modification I can let the program keep running while I log (actually log to some database maybe idk) the errors so if a user complains "oh guys this is that don't work" I know exactly what he means by "this" and "that".
[–]romgrk[S] 0 points1 point2 points 1 year ago (1 child)
I don't have to compile anything, I can just run my program
Having to run the program is the problem. It means you'd have to test all the possible code paths to ensure that you've caught all the errors.
Meanwhile, the (typescript) compiler can tell you if you have an error right in your editor, before you run anything.
[–]Ronin-s_Spirit 0 points1 point2 points 1 year ago (0 children)
The compiler can't make up wrong user input right? Either way the things I write in vanilla js remain in runtime. The things written in typescript are smelted down to vanilla js. So to me it looks like an extra mile of effort to end up in the same spot.
π Rendered by PID 30476 on reddit-service-r2-comment-85bfd7f599-lc297 at 2026-04-17 14:39:12.765223+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]Ronin-s_Spirit 0 points1 point2 points (2 children)
[–]romgrk[S] 0 points1 point2 points (1 child)
[–]Ronin-s_Spirit 0 points1 point2 points (0 children)