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).
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
Adam Sullivan
Classes help to keep the code organized
Jaxson Walker
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
Javascript has classes via prototypes. Just because you don't know about them, doesn't mean they do not exist.
Ryder Gray
Look into graph theory and show me a better way to organize a program than the class + member structure.
Josiah Fisher
what's your proposed solution?
Michael Butler
Can you start low level without learning high level?
Jaxson Wilson
Obviously.
Jonathan Flores
y
Colton Wilson
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.
Julian Green
Modularity helps with maintenance
Jonathan Ross
JavaScript has prototypes And this is some low level Jow Forums bait
Mason White
You can implement classes in JavaScript easily, but classes are not anywhere close to being JavaScript's core paradigm.
Camden Lopez
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.
Austin Jones
Tell me your language of choice
Jace Cox
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".
Josiah Davis
>classes might map well to the metal They don't.
Jason Perry
Remember to keep your data and functions seperate.
Owen Mitchell
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.