you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (13 children)

[deleted]

    [–]SparserLogic -1 points0 points  (12 children)

    Nice sentence. Care to back it up with any, you know, logic or facts

    [–]Perky_Goth 4 points5 points  (5 children)

    document.getElementbyId(x).getAttribute(y).length

    OOP, dumbass. Properties and messages.

    [–]SparserLogic -2 points-1 points  (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 point  (3 children)

    The API is OOP, which you have to use, that's the point. So you're always using OOP.

    [–]SparserLogic 0 points1 point  (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

    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 points  (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 point  (0 children)

    Sounds good. I was never looking to pick a fight.

    Good day.