Re: what could make AS easier (was: AppleScript)
Re: what could make AS easier (was: AppleScript)
- Subject: Re: what could make AS easier (was: AppleScript)
- From: Matt Neuburg <email@hidden>
- Date: Fri, 07 Dec 2007 12:01:49 -0800
- Thread-topic: what could make AS easier (was: AppleScript)
On Wed, 05 Dec 2007 16:10:59 -0800, "Stockly, Ed" <email@hidden>
said:
>Here's a few things I'd like to see in the language. (Apologies if it's a
>duplicate post I don't think my first version ever landed).
>
>Lists and records should be object oriented. We should be able to, for
>example,
>
>get every item of myList that contains myValue
>
> or
>
>tell every item of myList to open
>
>Set x to the sum of myList
>
>
>We should be able to work with record labels and set them the fly. For
>example,
>
>set myData to {date string for (currentDate): myInfo}
>
>or
>
>if record label of item 1 of printer list contains "HP" then...
>
>We should be able to sort lists and records. The basic sort command would
>sort a list of mixed objects by class, then by value. Sorting by size could
>also be an option. At the very least we should be able to sort numbers and
>text.
>
>The standard AppleScript installation (which includes appleScript, Finder,
>all the Scripting Additions available after install, and System Events)
>should be able to do much more without shell scripting. In particular,
>changing case, conversions to ascii and Unicode and back using lists or
>chunks of text, finding files, etc.
I'm going to agree completely in somewhat different terms. If AppleScript
had the string-handling capabilities of a modern scripting language
(including regex), and if AppleScript had the facilities of a modern
scripting language for rapid and convenient storage and retrieval of data in
collections (arrays and hashes), then things that are presently very hard,
slow, inconvenient, or unmaintainable in AS would become easy.
I believe these improvements could be added without in any way detracting
from the aspects of the language that scripters, especially beginners,
favor.
Something along these lines can, perhaps, be obtained through scripting
additions (and osaxen to do some parts of the job do exist today), but if
Apple wants to go that route, these should be standard additions available
on every machine. However, I believe that syntax issues would be involved
and so these things should be part of the core language.
m.
PS No mail, please, trying to equate arrays and hashes with lists and
records. That misses the point entirely. I can expand, if desired, on what I
do with arrays and hashes that lists and records cannot do. But I really
don't want to.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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