Please add a standard library to AppleScript

Originator:bruienne
Number:rdar://29331915 Date Originated:18-Nov-2016 10:32 AM
Status:Open Resolved:
Product:macOS Product Version:
Classification:Enhancement Reproducible:Always
 
This is a duplicate of rdar://28465563

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


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!