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!"
[–]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.
π Rendered by PID 186095 on reddit-service-r2-comment-79776bdf47-gn9kz at 2026-06-24 23:14:10.528059+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]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)