• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Object-Oriented JavaScript?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stoyan,

I've been out of the JavaScript loop for several years. When did JavaScript become object-oriented?
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know, JavaScript has always been based on Objects. Whether that qualifies JavaScript as "object oriented" is a debate that has ranged far and wide among the pedantic. ("JavaScript doesn't have true inheritance", "JavaScript doesn't have polymorphism", blah, blah, blah...).

Personally, I could care less about that debate. You can call JavaScript "object-oriented", or you can call it "object-based", or you can call it "Fred".

All that matters to me is whether I can use it well as a tool to get my goals accomplished.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Surely whether a language is object oriented or not matters in design. If a language has features that enable object oriented techniques there are different design considerations than otherwise.

Therefore, to extend the original question, have more OO features been added to javascript over the years to encourage its use in an OO way or is this largely unnecessary because of its other features?

Cheers,
Jim
 
author
Posts: 85
5
PHP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Bear - I couldn't have said it better myself

@jim - it's not that OO features have been added, it's that as of the past few years, we have been rediscovering the ones that exist already. ECMA standard, which is the standard developed after JS has been in the wild for quite a while, is itself almost 10 years old.
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic