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

Re: ' ' was used before it was defined

Expand Messages
  • montago_2004
    ... used ... I guess you are a teacher... or a blast from the past [B-)]
    Message 1 of 6 , Jul 27 2:18 PM
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "montago_2004" mdk@ wrote:
      > >
      > > doit();
      > >
      > > function doit(){ }
      > >
      > >
      > > //-----
      > >
      > > In ANSI-C its crusial that functions are defined before they are used
      > > - either 'physically' or by a shadow in the head-section.
      > >
      > > C-compilers wasn't smart enough to look ahead, and thus wouldn't
      > > compile unless functions came before Main...
      > >
      > >
      > > In Javascript, the compiler/parser IS smart, and thus it look ahead
      > > all files and all script, to find function definitions.
      > >
      > > therefore i find it somewhat annoying to be error'ed about the
      > > chronology of my code ... :-)
      >
      > I recommend that you heed JSLint's advice and declare your functions
      > before you call them.
      >

      I guess you are a teacher...   or a blast from the past B-)
    • osteocosmosis
      ... I ve always assumed the headaches it saves are extended look-ups of the function that wastes time. Is this right? Or does it combat namespace pollution?
      Message 2 of 6 , Jul 28 2:24 AM
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, re miya <remiya_ws@...> wrote:
        >
        > Yes, this is a good advice.
        >
        > It saves a lot of headaches.

        I've always assumed the headaches it saves are extended look-ups of
        the function that wastes time. Is this right? Or does it combat
        namespace pollution?
      • Re Miya
        ... Waste of time? I never thought about this.
        Message 3 of 6 , Jul 28 11:46 AM
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, "osteocosmosis" <fredistic@...> wrote:
          >
          > --- In jslint_com@yahoogroups.com, re miya <remiya_ws@> wrote:
          > >
          > > Yes, this is a good advice.
          > >
          > > It saves a lot of headaches.
          >
          > I've always assumed the headaches it saves are extended look-ups of
          > the function that wastes time. Is this right? Or does it combat
          > namespace pollution?
          >
          Waste of time? I never thought about this.
        Your message has been successfully submitted and would be delivered to recipients shortly.