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: garbanzito <email@hidden>
- Date: Wed, 30 Jan 2002 16:33:57 -0700
at 2002 01 30, 10:55 -0800, they whom i call Stockly, Ed wrote:
[garbanzito wrote:]
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.
i'm not sure of your point here, because i haven't argued
that scripting additions should have a unix syntax.
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.
bear in mind that unix commands are not a "language" per se.
and what i wrote above wasn't a recommendation. i was just
supporting my claim that "it will be very hard to
encapsulate all of the functionality of the shell commands
without some compromise on syntax."
Every command should be made available in pure AppleScript syntax.
sorry to take this out of context, but i couldn't really be sure
of the context...
it sounds like you are suggesting reimplementation every one
of hundreds of separate applications (which is what unix
commands are), all of which were written for a fundamentally
different environment (not just command line argument
syntax, but also the byte-stream philosophy) just so you can
use one awkward syntax instead of another? this would be a
huge project, with little apparent benefit, considering one
can do it all today if one can bear to mix two different
syntaxes .
i think part of the problem is wanting the capabilities of
unix without having to understand unix. i don't think any
kind of OSAX translation is really going to accomplish that.
for me AppleScript & the shell are just pragmatic tools, not
ends in themselves. i like using AppleEvents to manipulate
applications (i do it more in Frontier/Radio than in
AppleScript), but unix shell commands serve a different
purpose and i don't see the point of trying to "port unix to
AppleScript".
--
steve harley email@hidden