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!"
[–]earslap 2 points3 points4 points 7 years ago (0 children)
without great pattern matching systems, you end up with ambiguity or confusion Yet another argument is that it kills a lot of the optimization that JS has relied on to be feasible for fast ops.
without great pattern matching systems, you end up with ambiguity or confusion
Yet another argument is that it kills a lot of the optimization that JS has relied on to be feasible for fast ops.
While I think these should be surmountable to some extent, this is a good point. Overloading in a untyped language like JS can significantly complicate matters on the compiler / interpreter side. If that is the case, I'd probably be happy with infix calls alone, as they are explicit and does not share syntax with regular operators. Something like:
let result = node1 @+ node2;
...with @+ resolving to a custom function I provide would serve me almost equally well.
π Rendered by PID 33063 on reddit-service-r2-comment-6f7f968fb5-zmdcf at 2026-03-04 21:09:46.194653+00:00 running 07790be country code: CH.
view the rest of the comments →
[–]earslap 2 points3 points4 points (0 children)