• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Globals are considered harmful (was Re: Recursion script which doesn't?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Globals are considered harmful (was Re: Recursion script which doesn't?)


  • Subject: Re: Globals are considered harmful (was Re: Recursion script which doesn't?)
  • From: Ehsan Saffari <email@hidden>
  • Date: Sat, 7 Apr 2001 04:31:48 -0600

On Fri, 6 Apr 2001 22:09, John W Baxter <email@hidden> wrote:
>
>At 16:22 -0700 4/6/01, Paul Berkowitz wrote:
>>Well, this will be interesting. There are people, including some real
>>experts here, who believe that globals are dangerous, but I've never
>>understood why. It seems to be something taught in computer classes that
>>stick with people to the ends of their lives, just like the things that your
>>parents told you were "bad" when you were 5 years old. I've been wondering
>>if it's really no more than a superstition and habit, since I've never seen
>>anything bad result from using globals.
>
>It's taught in computer class because experience in the days of routine use
>of globals showed it *could* be a nightmare.

I've never attended a programming class, and I considered the chance of
someone else running another script concurrently that would use the same
global name as one of mine extremely remote.

So would the use of a property instead of a global be the answer,
initialized at the start of each run?

cheers
ehsan


  • Prev by Date: Re: Recursion script which doesn't?
  • Next by Date: Re: Archive on Goggle
  • Previous by thread: Re: Stable, CPU-friendly periodic task scheduling
  • Next by thread: Re: Globals are considered harmful (was Re: Recursion script which doesn't?)
  • Index(es):
    • Date
    • Thread