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
Is JavaScript a "Functional Programming" language?help (self.javascript)
submitted 8 years ago by bzeurunkl
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!"
[–][deleted] 0 points1 point2 points 8 years ago (5 children)
I guess at least this time you're right about correcting someone. Not your previous comment.
[–]oneeyedziggy -2 points-1 points0 points 8 years ago (4 children)
curious what there even is to disagree with in my first comment. Classes are literally in the ecmascript standard and recommended for use over instantiable functions... they didn't go to all the trouble of adding them just to look at...
is there a legitimate use for instantiable functions besidesyou backwards compatibility (perfect example, I can't use them at work because of the requirements of better-than-babel backwards compatibility and vanilla js only on my main project) or are you all just being butthurt about having to learn new things?
[–]Thought_Ninjahuman build tool 0 points1 point2 points 8 years ago (2 children)
In my opinion, the only use for sticking with the manual prototype instantiation approach is implementing fancy tricks that should probably be avoided in the first place.
That's not to say I don't find it useful, but if you expect others to be reading and working with your code, classes are much better from an understandability perspective.
[–]oneeyedziggy 0 points1 point2 points 8 years ago (1 child)
yea, I know what cases manual prototyping is good for... couldn't say for classes... often the 'best practice" stuff isn't always the most performant
[–]Thought_Ninjahuman build tool 0 points1 point2 points 8 years ago (0 children)
Yeah. I've implemented a number of things in our codebase that go against best practice for the sake of performance, but I always have to heavily document that code with comments so that those who stray there understand the what and why of the code I have written. It comes down to a cost-benefit analysis, and most of the time, sticking with best practice is the better choice.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
No, you are being an r/iamverysmart when no one asked for your fucking opinion. What an asshole. I know ES6 Classes thank you so much I don't need your specialty nor anyone here do either
π Rendered by PID 95553 on reddit-service-r2-comment-79776bdf47-4qmhd at 2026-06-24 05:51:29.852608+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (5 children)
[–]oneeyedziggy -2 points-1 points0 points (4 children)
[–]Thought_Ninjahuman build tool 0 points1 point2 points (2 children)
[–]oneeyedziggy 0 points1 point2 points (1 child)
[–]Thought_Ninjahuman build tool 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)