• 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: Linked lists (was osascript - path to me)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linked lists (was osascript - path to me)


  • Subject: Re: Linked lists (was osascript - path to me)
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 20 May 2002 18:00:37 +0100

On Monday, May 20, 2002, at 02:14 PM, Bill Cheeseman wrote:

on 02-05-20 7:55 AM, Christopher Nebel at email@hidden wrote:

As for linked lists, they're already there. (I had
been considering removing them. Do you really want them? Why?)

Given the lengths to which many people on this list will go to find the most efficient way to script any given task, why would you want to remove an existing technique that can be more efficient (in some senses for some purposes in some circumstances)? If another algorithm that is better on all
important points is incorporated into AppleScript, or if keeping linked lists involves a disproportionate development or maintenance cost, then removing linked lists makes sense. Otherwise, I would place the burden of persuasion on those who want to remove something that currently exists. I'm sure linked lists aren't used very often, but that may be only because they aren't currently documented in the ASLG.

Here's my thinking:

1. Linked lists aren't documented anywhere aside from the 1.1 release notes.
2. They're essentially useless right now, because the only operations for which they're more efficient than vectors (i.e., insertion and deletion) don't work. Of course, we plan to fix that, at least for vectors.
3. They're not entirely supported as it is -- they don't support a bunch of the properties vectors do.
4. They're not functionally equivalent to vectors -- "set" has radically different behaviors in some cases, and it's not always easy to predict where or why. (This is not a bug -- it's inherent in the data structures. We could perhaps make linked lists act like vectors, but it would tend to destroy the performance advantages.) This means that you can't just flip your script from one to the other without looking at it very carefully.
5. Having an extra class increases the implementation and documentation work accordingly.
6. I'm uncomfortable philosophically with asking scripters to make a decision between two subtly different data structures purely for performance reasons. AppleScript is supposed to be useful to people who don't know Computer Science and don't particularly want to know. I want to reduce the number of data types scripters have to deal with, not increase it.

As for the lengths people will go to to find the most efficient way to script something, I have a theory: I suspect the only reason it's such a popular "sport" is that AppleScript is so ^#@!ing slow. If we could remove the performance drags and support real object model operations so scripters didn't have to write hand-coded loops and copy list data back and forth all the time, people would be comfortable writing their scripts the way the founders intended. Or do people spend time on this just because they think it's fun?


--Chris Nebel
AppleScript Engineering
_______________________________________________
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: Linked lists (was osascript - path to me)
      • From: Bill Cheeseman <email@hidden>
    • Re: Linked lists (was osascript - path to me)
      • From: Matthew Stuckwisch <email@hidden>
    • Re: Linked lists (was osascript - path to me)
      • From: Emmanuel <email@hidden>
    • Re: Linked lists (was osascript - path to me)
      • From: email@hidden (Michael Sullivan)
    • Re: Linked lists (was osascript - path to me)
      • From: Bill Hoffman <email@hidden>
    • Re: Linked lists (was osascript - path to me)
      • From: Paul Skinner <email@hidden>
References: 
 >Linked lists (was osascript - path to me) (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Ping with AS under OS X?
  • Next by Date: Re: alias as string = as Unicode text?
  • Previous by thread: Re: Linked lists (was osascript - path to me)
  • Next by thread: Re: Linked lists (was osascript - path to me)
  • Index(es):
    • Date
    • Thread