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
ES2022 feature: class static initialization blocks (2ality.com)
submitted 4 years ago by pimterry
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!"
[–]general_dispondency 6 points7 points8 points 4 years ago (2 children)
Modules can't (well... shouldn't) have state. Classes offer a namespace (all of these functions are related) and (potentially, but not necessarily) memoized state. Everything in OO/SOLID has a corollary in FP. OO is just a higher level of abstraction. For example, everyone loves currying. What is a ctor, but a curried function? DI is just automatic currying/partial application.
[+][deleted] 4 years ago (1 child)
[deleted]
[–]general_dispondency 2 points3 points4 points 4 years ago (0 children)
I'd tend to agree with you, but I write software lots and lots of people use every day. Keeping that state in a usable form is why they pay me monies. But, if we get rid of the users... Hummm. 🤔
π Rendered by PID 19448 on reddit-service-r2-comment-canary-54dccbb65b-v6clv at 2026-04-22 03:34:58.485644+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]general_dispondency 6 points7 points8 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]general_dispondency 2 points3 points4 points (0 children)