Your point's are valid - my only real point here is that it is more of a prototype-based language, than object.

Thanks,
Anthony.

liorean wrote:
Brett Patterson wrote:
I am in the middle of a conversation with this guy who says that _javascript_
is an object-oriented language. Is he correct? Could you please site some
references?
    

There's many different things people mean when they talk about object
orientation. If they talk about the Java mode of object orientation,
then _javascript_ isn't object oriented but is pretty close. On the
other hand, if they talk about the Self mode of object orientation,
then _javascript_ is definitely object oriented, while Java has it's
flaws. There is no single definition that people agree on, only an
arbitrary number of points on a list where no single language uses a
metaphor that covers them all.

Everything in _javascript_ is an object. Objects inherit in a run time
delegation fashion from other objects in the prototype chain, a model
inspired by Self. Types are placed on values, not variables, but
everything has a type. Encapsulation comes from closures.

2008/10/24 Anthony Ziebell <[EMAIL PROTECTED]>:

  
_javascript_ is commonly referred to as 'object-orientated' but really,
_javascript_ is 'prototype-based'. They do have different meanings, but have
some similarities...
    

Class based inheritance is not necessary for a language to be object
oriented. Prototype delegation as mode of inheritance is less common
as language designs go, but it's just as powerful if not more so.

Above all, _javascript_ is an object based language.

It has imperative and functional properties, it has a
statement-_expression_ curlies-and-semicolons, it has object orientation
and higher order programming features, it has reified closures and
lexical scope with a few dynamic scope features etc. It's a hybrid
language. But it does have object orientation.
  

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to