Cancelling instantiation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Sweet

    #16
    Re: Cancelling instantiation

    This is incorrect, JS does not support protected members.

    George Jempty <fleetwoodd@bel lsouth.net> wrote in message news:<mO_0c.148 5$JN2.1140@bign ews4.bellsouth. net>...[color=blue]
    > <snip>
    >[color=green]
    > > By the way, it's not possible to have protected[1] members in
    > > JavaScript, is it? Shame...[/color]
    >
    > No, this is one of the great fallacies about Javascript. Javascript
    > supports closures and therefore supports protected/private members. See:
    >
    > http://www.crockford.com/javascript/private.html[/color]

    Comment

    • Douglas Crockford

      #17
      Re: Cancelling instantiation

      > This is incorrect, JS does not support protected members.

      Java needs protected members to compensate for the brittleness of the
      classical object model. JavaScript is class-free, and so does not need
      them. See http://www.crockford.com/javascript/inheritance.html

      Comment

      Working...