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

arguments

Expand Messages
  • Douglas Crockford
    JSLint now prohibits assignment to the arguments pseudoarray. The problem is that arguments is not a snapshot of the arguments that are bound to the
    Message 1 of 4 , Mar 29, 2008
    • 0 Attachment
      JSLint now prohibits assignment to the arguments pseudoarray.

      The problem is that arguments is not a snapshot of the arguments that
      are bound to the parameters. It remains linked, so changing an
      elements of the arguments array changes a parameter.
    • Douglas Crockford
      JSLint now warns about arguments.callee and arguments.caller. These will not be available in future editions of the language, so it is best to start avoiding
      Message 2 of 4 , Sep 8, 2010
      • 0 Attachment
        JSLint now warns about arguments.callee and arguments.caller. These will not be available in future editions of the language, so it is best to start avoiding them now.
      • Mike West
        ... I don t foresee browser makers removing the functionality, especially given it s prevalence in libraries that emulate some form of classical inheritance
        Message 3 of 4 , Sep 11, 2010
        • 0 Attachment
          On Thu, Sep 9, 2010 at 3:11 AM, Douglas Crockford <douglas@...> wrote:
          > JSLint now warns about arguments.callee and arguments.caller. These will not be available
          > in future editions of the language, so it is best to start avoiding them now.

          I don't foresee browser makers removing the functionality, especially
          given it's prevalence in libraries that emulate some form of classical
          inheritance (run a quick grep through closure and yui3, for instance).

          I'd suggest making this change optional, which would allow me to
          disable the test for the single file in which I use `callee`/`caller`,
          and throw warnings for any other inadvertent uses.

          -Mike
        • douglas@crockford.com
          ES5/Strict requires browsers to disable callee and caller. Future editions will be based on ES5/Strict.
          Message 4 of 4 , Sep 13, 2010
          • 0 Attachment
            ES5/Strict requires browsers to disable callee and caller. Future editions will be based on ES5/Strict.
          Your message has been successfully submitted and would be delivered to recipients shortly.