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

Re: [jslint] Re: /*global */

Expand Messages
  • Jakob Kruse
    Perfect! :) /Jakob ... From: Douglas Crockford [mailto:douglas@crockford.com] To: jslint_com@yahoogroups.com Sent: Mon, 01 Jun 2009 22:10:20 +0200 Subject:
    Message 1 of 34 , Jun 1, 2009
    • 0 Attachment
      Perfect! :)

      /Jakob

      ----- Original Message -----
      From: Douglas Crockford
      [mailto:douglas@...]
      To: jslint_com@yahoogroups.com
      Sent: Mon, 01
      Jun 2009 22:10:20 +0200
      Subject: [jslint] Re: /*global */


      > --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
      >
      > > Or, add some extrinsic way of saying, "These are the globals I'm not
      > > declaring but I don't want me to yentz me about."
      >
      > Right. You don't throw the baby out with the bathwater, even if the baby is
      > dead.
      >
      > So I am keeping /*global */. The variables that it defines will be const.
      > You can read them and call them,but you can't assign to them. That should
      > prevent the confusion that caused my problem.
      >
      >
      >
    • Douglas Crockford
      ... Which do you think is more likely, that a program wants to change the global name, or that a var name declaration in a function was forgotten? We won t get
      Message 34 of 34 , Jun 12, 2009
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "pauanyu" <pcxunlimited@...> wrote:
        > "name" needs to be writable. It has no value by default,
        > but you can assign a string to it, indicating the name of
        > the window/tab.

        Which do you think is more likely, that a program wants to change the global name, or that a var name declaration in a function was forgotten? We won't get an implied global warning, but at least we can get a read only warning. I think that is the more useful default.
      Your message has been successfully submitted and would be delivered to recipients shortly.