Re: Scripting Additions: Embracing the Horror of Unix
Re: Scripting Additions: Embracing the Horror of Unix
- Subject: Re: Scripting Additions: Embracing the Horror of Unix
- From: "Stockly, Ed" <email@hidden>
- Date: Wed, 30 Jan 2002 10:55:52 -0800
>
>me>>>AppleScripters should be protected from the "Horror of Unix".
>
>g>>they are protected -- they can avoid it completely if they want.
Yes, I've avoided it for a time by not Scripting OSX at all. The point here is that as commands available from Scripting Additions become available in OS X, they should maintain a 'pure' AppleScript syntax and not inherit the syntax of shell scripting, C, Perl or whatever.
>
>me>>>Jon mentioned Ed Lai's method of applying an aete dictionary to Unix shell commands and that certainly seems to be good place to start,
>
>g>>it will be very hard to encapsulate all of the functionality
>
of the shell commands without some compromise on syntax.
>
Perhaps, but I find that doing anything right is usually hard. That shouldn't frighten us away.
>>>>i suppose you could create an "argument record" to pass to each command, but that would mean inventing terms for every single switch in every unix command. the result would be no more comprehensible than the shell.
That's not how the AppleScript language works. In some languages you might have a dozen different commands that in essence copy file from one location to another but with different behaviors like making copies or replacing or copying folders and contents.
In AppleScript this would be one command with arguments and parameters.
>>>it might feel better,but it wouldn't work better. and that doesn't even begin to address pipes and redirection.
Whatever that means.
>>>>in fact it would be harder for some people who, knowing unix, know the syntax they'd want;
Right now they can call shell scripts and no one is saying that should be taken away. What I am saying is that functionality should be created in pure AppleScript otherwise I believe Apple will lose an important segment of their market.
>>>>i think it best to let unix be unix, write handlers to simplify it for some scripters, and write scriptable apps or OSAXen for speed where necessary.
That may make sense from a developers POV or a Unix expert, but I would see it as the death of AppleScript as we know it.
Every command should be made available in pure AppleScript syntax. What has me particularly concerned right now is some of the very basic functionality that we had in OS 7-9 is gone and the discussion for reintroducing it is leading to the quick and easy implementation that won't work for a lot of AppleScripters.
ES