Anthony Ziebell skrev:
Still confuses me though - if someone is object-orientated but is in
essence prototype-based (with regards to object, inheritance, etc), why
is it incorrect to say JavaScript is prototype-based?
Your confusion comes from comparing apples to steam trains.
Prototypes are an inheritance mechanism for objects.
Classes are another inheritance mechanism.
A language may implement either one or both (very rare).
It does not matter which inheritance mechanism that is used. It is still
an OO language.
It is *not* incorrect to say JavaScript is prototype based. It is. No
one is denying it.
It is *not* incorrect to say JavaScript is OO. It is, since OO is a
paradigm for programming which JS fits very neatly in. It is de facto
called OO in the ECMAScript spec.
It is *not* incorrect to say JavaScript is object based. It is - since
it has object wrappers for all primitive values.
You really did seem to say that classes are needed for a language to be
called OO. Now you have stated that you did not intend to say that. Case
closed.
Lars Gunther
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************