Okay. While I still can't sleep, a quick straw poll. Whoever wrote the Java interface to Applescript for OS X was:
- So comfortable with AppleEvents that he or she just wanted to replicate them verbatim in a new syntax, instead of providing a useful abstraction
- Completely ignorant of the Java Language
- A sadist
- All of the above
If you answered 'd', you're most likely correct!1 I spent a very frustrating Sunday afternoon putting together what should have been a simple servlet that puts my current iTunes song in the side-bar of the front page of this site. 75% of that time was spent with me being frustrated trying to decipher the totally opaque NSAppleEventDescriptor
object that the AppleScript call returns. The whole class is so encrusted with legacy cruft and assumed foreknowledge, it's almost impossible to work with.
1If you answered '4', your browser's list-style-type
support sucks