• 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: applescript-users digest, Vol 3 #2135 - 16 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript-users digest, Vol 3 #2135 - 16 msgs


  • Subject: Re: applescript-users digest, Vol 3 #2135 - 16 msgs
  • From: Emmanuel <email@hidden>
  • Date: Fri, 7 Nov 2003 08:20:17 +0100

At 11:40 PM -0500 06/11/03, Graff wrote:
>I hope you don't mind but I took the liberty of fixing your problem and also simplifying your code a bit.
>
>Things like this are a little bit easier to do with recursion,

No-one asked for my advice, and I can't exclude that in that particular case the idea is excellent.

But maybe I'll help someone by recalling that it is usually no good programming practice to use recursion in AppleScript where it is not fully required. When you use recursion, you are making a script which will work until the day when you really need it - that day when you've really got complex hierarchies and your script will hit the Stack overflow limit.

AFAIK, most recursive algorithms can rather easily be turned into memory-consuming but stack-savvy algorithms where you just maintain a FIFO list of the items to process: e.g. when you hit a folder, you append its contents at the end of the list.

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: applescript-users digest, Vol 3 #2135 - 16 msgs
      • From: Graff <email@hidden>
References: 
 >Re: applescript-users digest, Vol 3 #2135 - 16 msgs (From: Graff <email@hidden>)

  • Prev by Date: Re: Escape Apostrophes in 'Do Shell Script'
  • Next by Date: Re: Volume index bug in Panther?
  • Previous by thread: Re: applescript-users digest, Vol 3 #2135 - 16 msgs
  • Next by thread: Re: applescript-users digest, Vol 3 #2135 - 16 msgs
  • Index(es):
    • Date
    • Thread