![]() ![]() No idea why they did this, especially as linked lists have long since been de-documented and (I think) deprecated, but the stupid things are still in there along with all the other accummulated rot and damage of the last twenty-odd years. However, rather than just replace the original linked list implementation, they kept it and added the new vector array implementation alongside, using curly braces to distinguish these new vector lists from the square bracketed linked lists. Linked lists (as any fule kno) have dreadful O(n) performance characteristics when accessing arbitrary items (the most common use case), so vector array-based lists were introduced in a subsequent update (1.1?). Square brackets are the original list notation from AppleScript 1.0, back from when its list type used a linked list implementation. Except in Swift, where you have to use square brackets for everything.ĪppleScript Code Signing Language Design LaunchBar Mac Mac App Programming Security Swift Programming Language Note that you cannot use square brackets and colons for record literals. But it’s nice when you have a mix of lists and records to be able to write: [ I do not see this documented anywhere, so I’m not sure how far back scripts with this syntax will work. I learned, for example, that at some point AppleScript added support for using square brackets for list literals. It’s also instructive to look at the built-in actions to see how they work. There is actually quite extensive support and documentation for custom actions now, with more emphasis on sharing actions (and therefore code signing to make that secure).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |