• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object-Oriented JavaScript?

 
Karl Woods
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stoyan,

I've been out of the JavaScript loop for several years. When did JavaScript become object-oriented?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
jim cato
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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
 
Stoyan Stefanov
author
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic