Loading ...
Sorry, an error occurred while loading the content.

1401Re: [jslint] Re: top of inheritance chain

Expand Messages
  • Leonardo
    Jul 30, 2010
    • 0 Attachment
      2010/7/30 Douglas Crockford <douglas@...>
      (...)

      > The new operator makes a new object that inherits from the prototype
      > property of a constructor function. I do not recommend use of the new
      > operator.
      >
      (...)

      Why not Doug?

      also, in order do emulate classes i've been using closures like this:

      function ClassX(a,b){

      this.method=function(x){
      //...
      }
      //...
      }


      and in order do emulate inheritance, i'm using some call methods:

      function ClassY(w){

      ClassX.call(this,2,w);
      //...
      }

      in this way which features do i lose?

      sorry for thread kindap and thanks for any advice.


      [Non-text portions of this message have been removed]
    • Show all 8 messages in this topic