Whether _javascript_ is OOP is kind of a matter of
taste, rather than definition (Because there is no definition)
Agreed, hence the diverse arguments for / against, and no way everyone would be able to agree on it. Perhaps we need to write a standard on OO.

Thanks,
Anthony.

Breton Slivka wrote:
On Fri, Oct 24, 2008 at 11:00 AM, Anthony Ziebell
<[EMAIL PROTECTED]> wrote:
  
A 'superset' of ECMA3 which is not fully compliant. Right...

    



I think you're confused. Maybe you you're thinking of the w3c dom-
Which is a seperate standard and topic from _javascript_/ecmascript.
All implementations of _javascript_ in all the current browsers are
fully Ecmascript edition 3 compliant, so far as I'm aware. If you have
additional information about specific incompatibilities, I would be
extremely interested.


On Fri, Oct 24, 2008 at 9:01 AM, Anthony Ziebell
<[EMAIL PROTECTED]> wrote:
  
Hi Brett,

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

    

A language's method of inheritence is orthogonal to (has nothing to do
with) whether the language is object oriented. Inheritance is an OO
idea, so the fact that _javascript_ has inheritence of any kind pretty
well cements that it at least has object oriented capabilities. But it
goes further than that, because all values in _javascript_ inherit from
Object, and can be treated as objects, making _javascript_ a fully
object oriented language. It is not an imperative language with OO
features tacked on, like php5. _javascript_ is OO from the ground up.

The tricky thing here, and the part that I think is confusing you, is
that most languages described as OOP languages include an entity
called "Class" that _javascript_ doesn't appear to have. You might draw
from this the conclusion that if a language doesn't have "class", then
it is not OOP. Truth: "class" is just a random concept that quite a
lot of language designers happened to fixate on. "Class" is not
central to OOP. Object Orientation is *not* a computer science concept
with solid foundations in mathematics and philosophy. There is *no*
formal definition for what OOP is. There is no universally agreed on
method for determining whether something is or is not OOP.  OOP was
just an idea from some guy named Alan Kay, that he used as the basis
for his language SmallTalk. He designed SmallTalk that way because it
felt right, and he thought that it saved time. The concept was useful
enough that it became popular. This makes OOP more of a meme than a
scientific theory, as such. read more here:
http://users.ipa.net/~dwighth/smalltalk/byte_aug81/design_principles_behind_smalltalk.html


A later object oriented programming language called SELF showed that
classes were not necessarily the most important concept about Object
orientation. The most useful aspect of object orientation
historically, has been the bundling of code with the data it operates
on. Inheritence has recently been shown to be somewhat less important
and useful than it's been seen to be in the past. (deep inheritence is
bad practice in JAVA, for instance, in favor of interfaces). Alan Kay
once expressed surprise at how fixated on classes many later
programming languages have become, as he saw his concept of "message
passing" to be the most important aspect of the design.

_javascript_ is a language which is well documented to be a mashup
between 3 languages. It's a combination between SELF (Object
orientation, and prototype based inheretence), with scheme (functions
as first class values), dressed up with JAVA like syntax. (curly
braces)

_javascript_ contains all the important and useful parts of the object
orientation meme.  Since _javascript_ everything in _javascript_ is an
object- including functions, you can bundle code along with data into
a single object, storing functions as values on the object. Objects
delegate missing properties and methods to their prototypes, providing
a scheme for direct instance-to-instance inheritence which mimmicks
message passing.

So there you have it. Whether _javascript_ is OOP is kind of a matter of
taste, rather than definition (Because there is no definition). It's a
bit like pondering whether Piet Mondrian was an artist, because he
didn't paint pictures of "real" things. Of course he is, but it's
confusing because Mondrian was unlike any other artist anyone had ever
seen. In the same way, _javascript_ is an OO language unlike any other
OOP language most people have seen. (most people haven't seen SELF, or
newtonscript, or io, or REBOL)


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


  

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

Reply via email to