Welcome to Gaia! ::


What's the point of trying to use Javascript like it's an object oriented language?
MyNameIsKir
What's the point of trying to use Javascript like it's an object oriented language?
What's the point of using Java as an object-oriented language?
What's the point of using Objective-C as an object-oriented language?
What's the point of using C++ as an object-oriented language?
What's the point of using Ruby as an object-oriented language?
What's the point of using Python as an object-oriented language?
What's the point of using OCaml as an object-oriented language?
What's the point of using Lisp as an object-oriented language?
What's the point of using ....

Object-orientation is simply a way of writing abstractions. Nothing more, nothing less. In certain situations, the best way to model data is as an object. It's as simple as that.

JavaScript, though, is a bit of an odd duck when it comes to OOP: Instead of classes (well, up until ES6, which I think is an abominable update), it uses closures and prototypes to build objects. Conceptually, it's not actually all that different from how Java or C (that's not a typo) does OOP, except you don't define a structure to objects, and methods get put in the object's prototype.


        Well, the thing is, it is an object oriented language.

        Pyschic Stalker hit the nail on the head, I don't know anyone who really could
        have explained it any better.

Timid Bunny

well, almost everything in JS is treated as objects =w=;

i would personally wish for a wider variety of native languages in my web browser, but thats another topic =w=;
Usaki Tsukino
i would personally wish for a wider variety of native languages in my web browser, but thats another topic =w=;
Until we get a proper standard bytecode VM, you'll have to make do with asm.js, the 25 or so Lisp dialects (that I know of), Coffee (and its 15 dialects), Dart, TypeScript, a dozen Ruby implementations, a dozen Python implementations, Java and Scala compiled to JavaScript, .NET recompilers, a dozen Haskell compilers, a handful of OCaml compilers, Emscripten and a half-dozen other C++-to-JS compilers, and a few other languages that people have targeted to JavaScript. Other than that, yeah, there's no variety at all.

Quick Reply

Submit
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum