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

Re: /*global */

Expand Messages
  • Fred Lorrain
    ... It really make sens to use extern because that exactly what they are. In my Scripts most of the entries in /*global*/ are not Global variables.
    Message 1 of 34 , Jun 2, 2009
      --- In jslint_com@yahoogroups.com, "Randall Lee Spence" <analogueweb@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@> wrote:
      > >
      > > One thing I can do is to add more Assume options supporting popular Ajax libraries. If you are responsible for a popular Ajax library with a small, stable list of predefined globals, then give me the list.
      > >
      >
      > For library authors managing separate files and combing at runtime,
      > what about using the old /*extern */ declaration? That seems
      > like it would be a reasonable compromise. Just a thought.
      >
      > - Randall Lee Spence
      >

      It really make sens to use extern because that exactly what they are.
      In my Scripts most of the entries in /*global*/ are not Global variables.
    • 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
        --- 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.