DEV Community

Sergio
Sergio

Posted on

3 1

What's your thought about pseudoclassical OOP in JS?

Hi, I'm a JavaScript beginner and I found pseudoclassical inheritance a bad tool for Javascript, because why going for something pseudo when you can go directly for PHP (for instance)?.

Have you tried to work with pseudoclassical OOP style? Did you worked with pure prototypal inheritance focus? What's your learning about?

Top comments (4)

Collapse
 
savagepixie profile image
SavagePixie • Edited

To this day I've never found a good reason to try an OOP approach with JavaScript.

Collapse
 
imsergiobernal profile image
Sergio

So you never used an object literal?

Collapse
 
savagepixie profile image
SavagePixie

Sorry for the late reply, I had somehow missed this.

Yes, I have used object literals in JavaScript. I have also coded in an OOP paradigm with php. As Avalander said, they're different things. An object literal is a list of name-value pairs. OOP is a programing paradigm based on objects.

Collapse
 
avalander profile image
Avalander • Edited

Using objects doesn't make your code object-oriented programming any more than using functions makes it functional programming. At least not if we go back to Alan Kay's intent when he coined the term.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay