Currently Being ModeratedJan 26, 2013 11:23 PM (in response to Boboonski)
A few reasons:
- Applescript is geared towards inter-process communication rather than direct processing. It has some processing features, but it is not really a powerful processing language.
- Applescript is (by computational standards, even by scripting sandards) very slow.
- Applescript has very few event monitoring features. It can't easily read the keyboard or any attached devices (not in anything resembling real time), and it doesn't have the mechanisms to deal with interactive behaviors.
AppleScript would be a wonderful language if you were writing an old-style text-based game: think Adventure, or Zork, if you have any idea what those are (ahhhh, those were the good old days...). Anything more sophisticated would require so much cocoa that you might as well skip the applescript portions of the code.
AS is good at what it does. It is no good at all at what it doesn't do.
Currently Being ModeratedJan 26, 2013 11:32 PM (in response to Boboonski)
AppleScript would most definitely not be "favoured by most mac developers", no matter what kind of framework you added to it, and I am sure most will get a chuckle out of the "easy syntax" bit. As an application scripting language it has a place, but it just isn't designed for this kind of thing.
Currently Being ModeratedJan 27, 2013 8:59 AM (in response to Boboonski)
AppleScript is problematic for many tasks beyond GUI scripting. Games among those. AppleScript is slow. It's not portable. Its syntax is exceedingly verbose for what you can get from it. It's missing libraries and extensions necessary for common tasks. AppleScript has enough issues figuring out what just happened when you're "merely" scripting the GUI, and inserting delays is a far too common hack for some versions of that.
Read: MrHoffman is not a fan of AppleScript, beyond its use with scripting GUI applications, and particularly for scripting applications that are not otherwise scriptable.
For a number of games, building the game using Unity 3D or Unreal or similar is a common choices.
But in practice, the implementation language is less important than the game itself. To twtwtw's comment, Colossal Cave Adventure was written in FORTRAN. (I ported copy of the original version to gfortran on OS X, and have it posted.) If AppleScript is interesting to you, by all means use it. That's one way you'll learn its strengths and weaknesses, particularly when you can compare it with other implementation languages.
Currently Being ModeratedJan 27, 2013 9:12 AM (in response to MrHoffman)
To twtwtw's comment, Colossal Cave Adventure was written in FORTRAN.
Yes, I know it was. But it could have been written better in AppleScript.
Read: tw *is* a fan of AppleScript, and wishes MrHoffman would be a tad more generous.
Currently Being ModeratedJan 27, 2013 10:29 AM (in response to Boboonski)
There is a reason Apple did not write OS X entirely in AppleScript.