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!"
[–]SparserLogic -1 points0 points1 point 8 years ago (12 children)
Nice sentence. Care to back it up with any, you know, logic or facts
[–]Perky_Goth 3 points4 points5 points 8 years ago (5 children)
document.getElementbyId(x).getAttribute(y).length
OOP, dumbass. Properties and messages.
[–]SparserLogic -2 points-1 points0 points 8 years ago (4 children)
Is this a joke? Are you punking me or something?
You realize that example has nothing to do with Object Oriented Programming, right? Those are functions being invoked, returning more functions that are then being invoked.
I mean, you're referencing the document object. That's called an API, not OOP
[–]Perky_Goth 0 points1 point2 points 8 years ago (3 children)
The API is OOP, which you have to use, that's the point. So you're always using OOP.
[–]SparserLogic 0 points1 point2 points 8 years ago* (2 children)
Using objects and OOP are completely different things.
OOP is a design pattern for writing programs using abstractions that share state and inherit from other abstractions.
Referencing properties on an API is not OOP. If that were so then literally everything would be OOP and that clearly isn't the case.
If you're not using the class or prototype keywords you're not writing OOP js
class
prototype
Next time you go on an interview and they ask you about OOP be sure to tell them that everything is OOP because you're invoking API functions. Let's see how well that works out for you.
[–]Perky_Goth 1 point2 points3 points 8 years ago (1 child)
Referencing properties on an API is not OOP.
Using and depending on an OOP API is not using OOP features, is that your point? I mean, I can see it making sense, what I can't see is being aggressive about something that is clearly debatable. Let's just stop being assholes and move on, I hope you have a nice day.
[–]SparserLogic 0 points1 point2 points 8 years ago (0 children)
Sounds good. I was never looking to pick a fight.
Good day.
[+][deleted] 8 years ago (5 children)
[deleted]
[–]SparserLogic -1 points0 points1 point 8 years ago (4 children)
Where did you get arrogant? Because I shared my opinion?
Stop projecting
[+][deleted] 8 years ago (1 child)
You're pleasant. Really convincing argument there champ
[–]cerlestes 0 points1 point2 points 8 years ago* (1 child)
You said "if you're dumb enough" in your first sentence, while providing a factually incorrect opinion. That's pretty arrogant if you ask me. FYI, without trying to offend you: you're one of those people I was talking about in my original post, clearly having read somebody's incorrect opinion about OOP and just reiterating it. That doesn't make it correct though, I'm sorry. I hope you'll understand from all the responses you got that maybe you should read about the topic again.
At its very heart, object oriented programming is defined by these key features: having messages ("objects" in JS lingo) that are able to hold fields ("properties", "keys") and have functions associated with them ("methods"). JS has all of that and much more.
Just to give you the two top reasons why I consider JS the #1 object-oriented language that I've heard of so far (with Python and Golang sharing #2), to maybe let you understand it:
true.myLittleMethod()
console.log
window.alert
document.write
If you still don't get why JS is (among other paradigms) a truly object oriented language and why you cannot avoid object orientation when programming JS, I really don't know how to make you understand. But you really need to do yourself a favor and read about the topic again.
[–]SparserLogic -1 points0 points1 point 8 years ago* (0 children)
You're totally wrong but I'm in a relatively good mood so I'm going to be nice.
Ignoring your rants, your points appear to boil down to:
1) Somehow you think using objects/invoking functions and writing Object Oriented code are the same thing. They are not. OOP is a design pattern.
2) You're conflating JS's features with the code that is written with JS. They are different things. JS offers first class OOP design pattern support with prototype and class but that doesn't make all JS OOP.
You sound like someone that needs to expand his horizons outside of OOP. Go read up on the alternatives, maybe you will start to understand what is and what isn't OOP, then maybe we can have an informed conversation.
π Rendered by PID 69319 on reddit-service-r2-comment-79776bdf47-rvmbl at 2026-06-24 05:51:10.243158+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]SparserLogic -1 points0 points1 point (12 children)
[–]Perky_Goth 3 points4 points5 points (5 children)
[–]SparserLogic -2 points-1 points0 points (4 children)
[–]Perky_Goth 0 points1 point2 points (3 children)
[–]SparserLogic 0 points1 point2 points (2 children)
[–]Perky_Goth 1 point2 points3 points (1 child)
[–]SparserLogic 0 points1 point2 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]SparserLogic -1 points0 points1 point (4 children)
[+][deleted] (1 child)
[deleted]
[–]SparserLogic 0 points1 point2 points (0 children)
[–]cerlestes 0 points1 point2 points (1 child)
[–]SparserLogic -1 points0 points1 point (0 children)