Please add a standard library to AppleScript

Originator:automate.mantasystems
Number:rdar://28465563 Date Originated:2016-09-25
Status:Open Resolved:
Product:macOS Product Version:
Classification:Enhancement Reproducible:
 
In 10.9, Apple finally added a long-overdue native library import mechanism to their venerable AppleScript language, for which we are grateful. However, this library system would be vastly more useful if macOS would also include a small set of standard libraries that add commonly-needed general-purpose commands not provided by AppleScript itself.

For your consideration, I've attached a reference/candidate 'standard library' addressing seven long-deficient areas:

Date
File
List
Number
Objects
Text
Web

All code is 100% original except for the trigonometry and logarithmic commands in the Math library (see file comments for attribution). SDEF user documentation and unit test coverage is fairly good, if not 100% complete. (A separate Xcode project for building the unit test running is also attached.) While it's functionally complete, there are still one or two bugs to shake out (e.g. some of the Date tests currently fail), but overall it's robust, practical, production-quality AppleScript code that should be easy enough for other developers to understand and maintain.

If Apple can develop a better AppleScript standard library itself, I look forward to seeing the results in 10.13. Otherwise I freely offer the attached software – all original code, documentation, copyright, and attribution – to Apple, to adopt as its own if it wishes and use if and how it likes.

Comments

added my own bug report

bug number 29329704 on Apple Bug Reporter

By jean.christophe.helary at Nov. 18, 2016, 10:01 a.m. (reply...)

source code link

Mark Aldritt has a clone of the original repo here:

https://github.com/alldritt/applescript-stdlib

By automate.mantasystems at Sept. 25, 2016, 1:17 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!