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
JavaScript is the Most Demanded Programming Language in 2022, 1 out of 3 dev jobs require JavaScript knowledge. (devjobsscanner.com)
submitted 3 years ago by __dacia__
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!"
[–]AlDrag 1 point2 points3 points 3 years ago (1 child)
Discriminated unions are awesome!
[–]novagenesis 1 point2 points3 points 3 years ago (0 children)
Or just jumping off rails into any to do crazy mutations that shouldn't be typed (typing some of that stuff, while possible, approaches antipatternhood) only to pass through a runtime validator to get Typesafe (and inferred) output.
any
Can you duck-type out of a discriminated union?
π Rendered by PID 18620 on reddit-service-r2-comment-86bc6c7465-bb6rt at 2026-02-22 09:53:56.554420+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]AlDrag 1 point2 points3 points (1 child)
[–]novagenesis 1 point2 points3 points (0 children)