• 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: Flattening Nested Lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flattening Nested Lists


  • Subject: Re: Flattening Nested Lists
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 26 Jan 2009 16:37:12 -0600

On Jan 26, 2009, at 12:03 PM, Mark J. Reed wrote:
Global variables are bad because they make it harder to tell what's
going on.

Well, not necessarily, if used correctly. However, "Global variables are bad" because they are persistent. And being persistent means that the compiled executable file is modified every time you use a global. (This is not currently a big problem, but wait until code-signing is required.) I have a situation where I need to pass a condition encountered in a deep list of handlers to the end of the main handler. That means that a lot of code has to be written to pass this condition to the location where it will be used. It's easier to tell what's going on if I simply set a global, then test the global at the end of the script. But, I can't do this because globals are persistent. So, I use a lock on a folder as a flag ... and it works like a charm.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Flattening Nested Lists (From: Brian Christmas <email@hidden>)
 >Re: Flattening Nested Lists (From: "Michael Schmidt (BRT)" <email@hidden>)
 >Re: Flattening Nested Lists (From: Philip Aker <email@hidden>)
 >Re: Flattening Nested Lists (From: "Mark J. Reed" <email@hidden>)
 >Re: Flattening Nested Lists (From: Philip Aker <email@hidden>)
 >Re: Flattening Nested Lists (From: "Mark J. Reed" <email@hidden>)
 >Re: Flattening Nested Lists (From: Philip Aker <email@hidden>)
 >Re: Flattening Nested Lists (From: "Mark J. Reed" <email@hidden>)
 >Re: Flattening Nested Lists (From: email@hidden)
 >Re: Flattening Nested Lists (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 6, Issue 40
  • Next by Date: Getting Properties from an Applet
  • Previous by thread: Re: Flattening Nested Lists
  • Next by thread: Re: Flattening Nested Lists
  • Index(es):
    • Date
    • Thread