Is there a bigger meme than classes in high-level languages?

I understand if you're doing low-level stuff, classes might map well to the metal. But for high-level languages, what advantage do classes bring exactly that makes them worth building an entire paradigm around? Classes make it so that the computing paradigm is needlessly dualistic: you have templates, and you have objects. It's conceptually much more elegant to just have objects and to build those objects using functions (which themselves are just a kind of object).

For whatever faults it might have, Javascript gets this right: no classes (except under the hood in some implementations like Chromium, and as ES6 syntactic sugar).

Attached: OOP_Circle.png (430x371, 21K)

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
twitter.com/AnonBabble

Yes, web dev and the creation of a shit ton of frameworks that are seriously considered as "enterprise software"
Anyway, the whole point of classes is to make things easier to understand, just look at your image, even a kid can understand what an instance is

Classes help to keep the code organized

If you don't understand the point of classes then you've never worked on a large project. If you can keep all the disparate functions and parts in your head then it is not a large project

A base class pointer to derived class object.

developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

this

Javascript has classes via prototypes. Just because you don't know about them, doesn't mean they do not exist.

Look into graph theory and show me a better way to organize a program than the class + member structure.

what's your proposed solution?

Can you start low level without learning high level?

Obviously.

y

In my experience OOP rarely works out like the picture. Derived classes usually have added functions which makes polymorphism useless if the base class doesn't have it.

Modularity helps with maintenance

JavaScript has prototypes
And this is some low level Jow Forums bait

You can implement classes in JavaScript easily, but classes are not anywhere close to being JavaScript's core paradigm.

Yes, closures. A good language doesn't require them.

Listen, dumcumster, like everywhere else you want a strict separation of concerns and the strict separation of logic and data is one of the most important things, no matter what a bunch of lisp brainlets says. You don't need classes, but you need a proper separation between compile-time and run-time and compile time type declarations. In fact, all kinds of declarations should happen at compile time, or else you end up with garbage like Python. And JS is shit tier. I mean, prototype based OO is garbage, but JS implementation of it is in particular. It couldn't even clone objects, not too long ago.
And if nothing else, you should learn this - or else you'll the hard way: Mixing logic and data -> all kind of security, performance and inflexibility issues. That goes from both sides, btw.

Tell me your language of choice

The one right for the job. Tendency to multiparadigm languages, because they tend to thrive.
Oho, you probably wanted to "but it has closures" me, but we know they are just in there because some cumfaces said "sigh, they expected it".

>classes might map well to the metal
They don't.

Remember to keep your data and functions seperate.

First line of text
JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript.