Re: AS Library Question
Re: AS Library Question
- Subject: Re: AS Library Question
- From: Shane Stanley <email@hidden>
- Date: Tue, 22 Dec 2015 12:59:36 +1100
On 21 Dec 2015, at 2:22 PM, Jean-Christophe Helary <email@hidden> wrote:
>
>> On Dec 21, 2015, at 08:34, Shane Stanley <email@hidden> wrote:
>>
>> On 20 Dec 2015, at 11:24 PM, Jean-Christophe Helary <email@hidden> wrote:
>>>
>>> If veteran AS coders were to write a rock solid standard library for Applescript, open sourced etc. I am pretty sure that word of mouth would spread the news like wild fire and that *everybody* would use it *and* promote it.
>>
>> Sadly, history suggests you're completely wrong.
>
> Do you mean that there were attempts are providing an open source standard library for Applescript and that it did not get used ?
All this discussion about standard libraries, and examples like Jon's SmartString, sent me off to have a look in my email archives. You're relatively new here, so you probably missed this. But...
Two years ago, almost to the very day (December 18-20, 2013), I posted three sample libraries to this list. All were based on an object-oriented design shamelessly borrowed from SmartString, down to the names.
SmartList included handlers for extracting sublists, deleting an item or items from a list, deleting and replacing ranges of items in a list, sorting a list in several ways, including as sorted in the Finder, filtering lists, and more.
SmartRecord included handlers for getting all the keys and values from a record, building records with labels on the fly, removing items from records, and a couple of others.
SmartSet was an implementation of a set for AS users, with the ability to do things like add/remove/swap/sort, plus things like intersect/minus/union.
I also posted instructions and samples of their use. Chris Page followed up the SmartList post on a point of terminology. SmartSet provoked a long discussion about the mathematical definition of a set versus the computer definition. SmartRecord didn't raise a murmur.
So they worked, they were open-source, they provided functions that people have been asking for in this thread, and they were designed like something that is now being lauded in this thread. And I get the impression that the total number of people using any of them comes to roughly zero.
Now I don't blame people for not using them. (Apart from anything else, much as I personally like the approach Jon uses, I don't think most scripters do.) But the fact is that AppleScript is like a lot of other programming: what users *say* they want and what they really want are not necessarily the same thing. It goes back to Jon's point about simplicity, and how anything that runs counter to that just won't see wider acceptance.
(Apologies if I sound a bit jaded. I'd really like to get more into the festive mood...)
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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