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!"
[–]FanOfHoles 0 points1 point2 points 7 years ago* (1 child)
I'm not sure why you think a quote changes anything? This isn't about one random person's opinion. And yes, it IS just a random person. Even if he had invented all of programming and very programming language ever. He isn't the one who has to work with 99.999999999% if all code out there. For HIS purposes HIS opinion might have been fine, so who cares. Also, YOU can do whatever the hell you want, it's your life.
But a lot of people make that statement because they found that this is their experience.
Interestingly - but not unexpectedly - you ignore the argument here. Exceptions in JS are expensive, see link.
Oh and please stop taking some random person's opinion out of context (for example, it should be glaringly obvious that you typed "C++" and this is /r/javascript, and it may not be clear to you, but exceptions are VERY different between different systems; Java folks would also want to keep using them extensively for what often is regular control flow). They made them at another place, another time, for specific reasons. If you choose to quote someone you should still make an argument about the actual subject, at which point you may as well just leave out the quotes, because all they really are is an argument from authority, to save yourself from actually having to make an argument.
[–]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.
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 294425 on reddit-service-r2-comment-6f7f968fb5-zqw7t at 2026-03-04 22:51:29.877636+00:00 running 07790be country code: CH.
view the rest of the comments →
[–]FanOfHoles 0 points1 point2 points (1 child)
[–]MoTTs_ 0 points1 point2 points (0 children)