Mathew Robertson skrev:
All this talk over JavaScript not supporting classes, is incorrect. I put together a
little demo of classical "class-based" inheritence.
The only real limitation is that you can't do "protected members" and "friends"
and the syntax might be considered to be a little clunky.
http://members.optusnet.com.au/~mathew/js/
Liorean has already provided clarification on the difference between
supporting class-based inheritance through emulation, vz. having native
support.
I would like to point out that John Resig writes about this topic in hos
book Pro JavaScript Techniques, and that it is implemented in one form
or another in many libraries.
There was also an effort to support the now canceled ECMAScript 4 syntax
in older browsers, Mascara, that included support for classes.
http://ecmascript4.com/ I suppose its status is uncertain.
In short, as MR shows: If you feel intimidated by prototypal
inheritance, there are tools available to make JavaScript behave in a
fashion that is more suited to your tastes. :-)
Lars Gunther
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************