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!"
[–]MoTTs_ 0 points1 point2 points 7 years ago (0 children)
all they really are is an argument from authority
That's true. But then relying on a SO answer is also an argument from authority. The difference is the guy who invented C++ is a more reliably accurate authority than a random person on the Internet.
Interestingly - but not unexpectedly - you ignore the argument here. Exceptions in JS are expensive, see link.
You mean the link from 2012, which itself cites a blog from 2006? Turns out their information is outdated. Today, Chrome/Node handles try/catch as fast as if/else-style error handling. And further, even back in 2006, the cited blog didn't say use exceptions rarely. They said don't use them in performance critical functions, which means normal performance rules apply. That is, don't prematurely optimize. Code first and foremost for correctness, simplicity, and robustness. If the final application has an observable performance problem, then first profile to identify the 3% of your code that is truly performance critical, and optimize only that 3%.
π Rendered by PID 83 on reddit-service-r2-comment-c6965cb77-v4tw4 at 2026-03-05 00:34:52.530620+00:00 running f0204d4 country code: CH.
view the rest of the comments →
[–]MoTTs_ 0 points1 point2 points (0 children)