modularizing code [was: Re: AppleScript a miserable and utter failure]
modularizing code [was: Re: AppleScript a miserable and utter failure]
- Subject: modularizing code [was: Re: AppleScript a miserable and utter failure]
- From: has <email@hidden>
- Date: Thu, 29 Sep 2005 09:12:47 +0100
Mark J. Reed wrote:
> > AppleScript programmers, unlike Perl programmers, are flat-out resistant to
> > using 'libs' or 'mods'.
>
>I suspect that has a lot to do with the difficulty of writing 'libs'
>or 'mods' for AppleScript IN APPLESCRIPT. There's no simple
>"include"/"require"/"use" directive, so unless you're willing to go
>learn how to write an OSAX (in some non-AppleScript language), it's
>very difficult to modularize AS code.
I disagree. Lack of a native no-brainer 'import' command is definitely a chilling factor, but there's more to it than that. Writing (and using) libraries in AS is a little bit of a chore compared to most languages (less support from the language means more boilerplate coding for users), but it's still much, much easier than learning how to write good modular, reusable code in the first place. But even when ASers are supplied with free, good quality, pre-written libraries and third-party import mechanism (with point-n-click wizards to reduce it to nearly-no-brainer level), most are still extremely reluctant to use it.
If ASers really wanted to use libraries you'd hear all about it, but in fact there's very little noise. Therefore, IMO it's primarily a cultural, not technical, problem. The two major sticking points I see are: 1. many ASers just aren't aware of/comfortable with abstraction, and the higher the level the harder they find it to wrap their heads around; and 2. a hearty dose of 'Not Invented Here' syndrome, as Gary's mentioned.
Perversely, the same folks have no problems using osaxen, which fulfill much the same role, but that may be because osaxen are a fait accompli: their black box nature means "what you can't see can't hurt you" so they just pick up and use them without thinking. Whereas libraries, being written in AppleScript lie too close to home, making them vunerable to over-analysis, projection and paranoia. Folk scare themselves off by thinking too hard about all the details, instead of doing what they do with osaxen: ignore what's inside the thing and just use it. It's all about learning to let go and enjoy the ride; something folks in other languages are happy to do, and what abstraction is all about.
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden