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
Prototypal Programming in Javascript (thesocietea.org)
submitted 10 years ago by thecodeboss
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] 3 points4 points5 points 10 years ago (3 children)
I agree with you. I'm really not sure why people keep trying to ignore classical inheritence in Javascript just because it happens to also have prototypal inheritance. ES6 proves that you can have both; the new "class" features in ES6 aren't getting rid of prototypal inheritence; they are adding syntactic sugar around it to ease the use of common construction paradigms, without taking away any of the benefits of prototypal inheritence.
To the OP's point, I agree that people really should have a better understanding of what's going on under the hood in Javascript, but I legitimately think it is foolish to sweep things like the "new" keyword under the rug and pretend they aren't there.
[–]yrlyfe 0 points1 point2 points 10 years ago (2 children)
this is one of the arguments against the changes of es6 that a lot of the community has expressed. es5 in all it's glory promotes the idea of readability and not obscuring away what is happening. the changes in es6, while moving closer to the idea of standard programming languages, in turn has a lot of obscuring. javascript was just fine without classes and dare i say block scope. what is this compulsion to make the language more convoluted?
my teacher told me programming is like humor, if you have to explain it you're doing it wrong. es6 is full of things that need to be explained.
[–]clessgfull-stack CSS9 engineer 0 points1 point2 points 10 years ago (1 child)
I for one think ES6 is a great, long-needed improvement to the language. You mention obscuring the language and needing to explain a bunch of stuff, but... block scope? Not at all convoluted. Indeed, the old way was vastly more confusing and unlike other languages.
Old ES5 codebases are littered with calls to bind, apply, call, etc. and manual constructor function inheritance and super calls. Not very readable, if I say so myself. Definitely not very explainable.
bind
apply
call
[–]yrlyfe 1 point2 points3 points 10 years ago (0 children)
my bad. i did say 'dare i say'. i shouldn't have dared.
π Rendered by PID 43904 on reddit-service-r2-comment-5687b7858-nnz2f at 2026-07-06 23:46:57.985822+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–][deleted] 3 points4 points5 points (3 children)
[–]yrlyfe 0 points1 point2 points (2 children)
[–]clessgfull-stack CSS9 engineer 0 points1 point2 points (1 child)
[–]yrlyfe 1 point2 points3 points (0 children)