The English-Likeness Monster
daringfireball.net
daringfireball.net
And in all my programming adventures, AppleScript has to be the weirdest, most backward, hardest to figure out language I've ever had the misfortune of using. I think Gruber nails it here -- English and other natural languages are not nearly precise enough to express program text, and the problem is exacerbated when you try to support multiple natural languages simultaneously. Visual Basic may not be a terrific programming language, but at least it's internally consistent.
To quote Einstein, "Everything must be made as simple as possible, and not simpler." AppleScript's designers tried to simplify away the essence of programming, and wound up making scripting much, much harder than it should be.
To anyone out there who needs to script OS X, save yourself a great deal of pain and avoid the temptation of using AppleScript just because it's OS X's "native" scripting language (this is was my mistake). Access OSA through a sane language like Ruby or Python instead.
As a programmer I agree with you...my experience tells me it's horses for courses though.
— http://userweb.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf . The example it gives for the “professional” dialect is “{ words | style == bold }.character[1]”, which as far as I know would have made it one of the first non-research languages to use pseudo–set-builder notation like that.
sdef /Applications/iTunes.app | sdp -fh -o -
This was a life-saver for me, as I find AppleScript absolutely impossible to use.[1] http://inform7.com/ [2] http://slesinsky.org/brian/code/i7_poetry.html
The instructions on this page for building and testing worked fine for me.
http://oreilly.com/pub/a/mac/2007/02/27/replacing-applescrip...
"It was a grand and noble idea to create an English-like programming language, one that would seem approachable and unintimidating to the common user. But in this regard, AppleScript has proven to be a miserable and utter failure."