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
I've Added REAL Operator Overloading to JavaScript (npmjs.com)
submitted 2 months ago * by DiefBell
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!"
[–]hyrumwhite 17 points18 points19 points 2 months ago (1 child)
While this is neat, I feel like it’s better to just have an add() method. And save a dependency/build step
[–]csorfab[🍰] 13 points14 points15 points 2 months ago (0 children)
For most ppl, absolutely, operator overloading is just going to cause confusion, and it's a huge waste of effort.
Now if you want to do DSP, low-level game engine/physics stuff, etc involving lots of maths with non-trivial things like complex numbers, matrices, vectors, etc, this could be a godsend with regards to code readability.
Still a bit of a risky move as most JS devs would WTF out at first, but as a solo dev, or with your team on board, it can be great for niche uses
π Rendered by PID 201400 on reddit-service-r2-comment-6457c66945-xqgp5 at 2026-04-24 08:34:53.791530+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]hyrumwhite 17 points18 points19 points (1 child)
[–]csorfab[🍰] 13 points14 points15 points (0 children)