Jason Snell @ Macworld has an article reacting to Jonathan “Wolf” Rentzsch‘s declaration that AppleScript is dead.
Hrm… get this. That previous link to AppleScript takes you to the developer web pages for AppleScript. I originally wanted to link to Apple’s user/commercial page for AppleScript: www.apple.com/applescript. But if you click on that, notice what it takes you to: Automator. That tells you what Apple thinks about AppleScript as a technology.
It’s scripting for the rest of us.
I am not at C4 so I have no idea what Wolf’s talk consisted of, I only have Jason Snell’s article to go on. But given what Mr. Snell writes, I think the reasons for declaring AppleScript dead are pretty lame: it’s a crappy language, it’s hard to program Applescript support.
I will not deny either of those things. That it’s a crappy language is unquestioned. The only standard thing about it is how lacking in standards it is. That one application may script thing one way, another does it another way. It can be incredibly frustrating to write scripts. But once you figure out all the quirks, it works out. Plus, the language strives to be English-like in its read. It’s not meant to be a hard-core programmer language full of geek-speak. The goal is to try to just be like people think and talk, which is part of why it becomes so difficult to work in, but also does make entering into writing AppleScripts a lot easier for many people. The language is less intimidating, it’s easier to read and understand existing scripts, it’s easier to get going in writing AppleScripts and you can probably write some simple ones just by looking at examples (not going through formal tutorials).
The problem with JSTalk is well… go look at the JSTalk web page. While I admit it’s got a fantastic bit of functionality (bridging is a great thing, and I’ve enjoyed using PyObjC), it’s way too programmer, way too geeky. This is not scripting for the rest of us, this is scripting for geeks.
Is AppleScript support hard to program for? Perhaps. I dealt with it back in old days and without question it was a bear. One of the great things about PowerPlant was its support of AppleEvents and trying to take away some of the complexity and pain of writing scriptable apps. Now we have Cocoa Scripting and folks, writing scriptable apps has never been easier. If you are writing a well-designed (code-level) and factored application, getting your app to be scriptable via Cocoa isn’t horrendously difficult. Apple’s taken great steps to facilitate making apps scriptable. Of course, that’s only useful if you’re using Cocoa, but most modern Mac developers are doing so.
AppleScript is the native scripting language of the Mac OS. It’s not just a way to automate things, but it’s a way for applications to communicate with each other. Like all scripting it’s a way for end users to take the tools (applications) given to them and tailor custom solutions to solve their specific needs. If writing actual scripts isn’t what you want to do, then there is Automator to take away much of that trouble, but Automator is still built upon AppleScript technologies. If you want to best integrate with the system, Apple events and AppleScript is really the way to do it. JSTalk has appeal for geeks, but AppleScript is for the rest of us… which is what Macs have always been about; let’s not lose sight of that.
Hi, I agree. Applescript is for the rest of us not-so-geeky types. I failed math in high school, and dropped out of C++ before I was thrown out. Yet I’ve been able to write some pretty useful scripts and applets in Applescript.
Thanks for the post.
Greg Ledger
http://www.macproductionartist.wordpress.com
Yup. Now in their defense, C4 is a by-geeks-for-geeks gathering and if they want to come up with and promote a geek solution, I think that’s fine. Certainly we geeks often need different tools and solutions, and I’ve leveraged the power of AppleScript to get work done and would sometimes find life easier if I didn’t have to directly use AppleScript (the language). But that doesn’t mean AppleScript is dead nor should it be killed off…. “the rest of us” still need ways to get a job done and tools by which to accomplish that job.
Pingback: Applescript: Not Dead Yet « Clark's Tech Blog
I think the comparison between Applescript and JSTalk is a bit misleading. The real comparison ought be Applescript vs. Python + Appscript or Ruby + Appscript. Python is a very easy language to learn and I think once you’re used to it’s way of handling objects much easier to read than Applescript. About the only downside is that there’s simply not as many online resources for Appscript as for Applescript. But there are lots of people who code in it. And even an Applescript -> Appscript translator.
One of the reasons I chose to learn Python was because it was rather well thought out. It looks good on the page. Structured well, readable, logical constructs. Code written in Python isn’t the automatic nightmare like Perl can be. 🙂 But still, it’s kinda geeky. It’s not a scripting language for the rest of us.
I mean, I could say “once you get used to it, it’s easy to read” about any language, even highly obfuscated Perl. But that’s just it: you have to get used to it. The intent of AppleScript is that you don’t have to get used to it, so long as you speak English. There’s very little “programmer geek speak” involved in AppleScript, just what has to be there, else it attempts to be as English-like and “natural language” as possible. Of course, that’s the goal and all too often it falls short. Still, it’s the goal to strive for, especially as developers create their application’s scripting dictionaries.
For me in the end, I got over being a programming language bigot years ago. The reason we have so many langauges is because they all serve different specific purposes. It’s really not right to pick or stick with a language because “I like it”, but moreso that you should understand as many languages as you can and then based upon the task at hand pick the language that best enables you to accomplish that goal. If the job is best done with Python and all it has to offer, use that. If the job is best done in AppleScript given what it has to offer, use that. And even if JSTalk is the best way to go, use that. I just don’t think it’s right to call for the death of AppleScript because “it’s hard to use”… for many people, JSTalk would be even harder. It’s all relative to you, your skills, your goals.