Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the TidBITS Content Network for Apple consultants.

Using Swift as a Scripting Language

Programmers typically have to learn several languages to do their jobs. In the Apple world, that might include Objective-C to code Mac and iOS apps and AppleScript to automate common tasks. But developer Filip W has shown that Apple’s new Swift programming language can be used both for app development and as a scripting language. As a proof of concept, he developed a script to change his Mac’s wallpaper in Swift, without using Xcode.Generic Globefollow link

 

Comments about Using Swift as a Scripting Language
(Comments are closed.)

Rainer Lanz  2014-08-07 04:52
Dear Josh,

thanks very much for the link. Upon hearing about Swift, and especially its "Playgrounds" feature, I was also thinking if/when Swift might eventually replace AppleScript, and am therefore very interested in Swift for scripting purposes. And the linked article shows that, to some degree, Swift is already capable of accomplishing general purpose scripting tasks, outside of Xcode.

However, there are two reasons why your headline is misleading: First, AppleScript as such is mentioned nowhere in Filip W.'s article, and second, his example is for scripting a user preference, and has nothing to do with inter-application scripting, which is where AppleScript is almost absolutely indispensable so far. So I would propose that you revise your external link headline to better reflect the linked article's content.

Best Regards

Rainer
zaheer  2014-08-07 05:48
Interesting! Will have to add it to www.LearnSwift.tips

Do check out the site if you're interested in learning swift!
Ray Robertson  An apple icon for a TidBITS Supporter 2014-08-07 09:03
Could not agree more with Rainer's comment. Well stated.
Rainer Lanz  2014-08-09 08:07
Dear Josh, thanks for clarifying the article's title!

Dear zaheer, thanks for your interesting site aggregating info on Swift!

Best regards, Rainer