Re: AppleScript and shell scripting
Re: AppleScript and shell scripting
- Subject: Re: AppleScript and shell scripting
- From: "John C. Welch" <email@hidden>
- Date: Sun, 29 Jul 2007 22:17:52 -0500
- Thread-topic: AppleScript and shell scripting
On 7/29/07 19:46 PM, "Bill Briggs" <email@hidden> wrote:
> At 9:44 PM +0100 7/29/07, has wrote:
>> However, unlike AppleScript syntax they have the significant advantage of
>> being completely regular and unambiguous, so once you do know how interpret
>> them it's easier to make out what they're saying.
>
> Indeed. People bitch about C, but it executes at top speed (unless you can
> write better assembler) and with C you can change platforms and it'll compile.
>
>
>> Traditional syntax = short-term pain, but long-term gain.
>>
>> AppleScript syntax = short-term gain, but long-term pain.
>
> This has an analog in human languages. Having learned German I can say that
> it's harder to get started (gender and case declensions don't come easily at
> first), but once you have the pronunciation key, and the basic grammar, there
> are so few exceptions that you can go on to master the language on your own.
> You can pronounce words you don't know because it's a completely regular
> system. You can more often than not sort out the meaning of compound words.
> It's possible to move on after you have the basics.
>
> In contrast, my friends in Europe tell me that it's easy to learn a few
> basics in English (as a second, or third, or fourth language), but to master
> idiomatic English, with the inconsistent pronunciation key, the plethora of
> irregular verbs, and the fantastic number of exceptions to every rule, is
> bloody near impossible. As bad as trying to learn Finnish with its 47 active
> cases.
There is a problem with all these language comparisons, no matter how well
thought-out they are, (and *most* have been), and that is they are examining
the languages alone. They have all ignored one factor that is equally
important as the "regularity" of the language, and is, IMO, *more* important
than such puffery as libraries et al:
Brain Wired-ness compatibility
(Matt has just cried out at my assault on the language here, but it's the
best term I can come up with.)
Language, syntax, and the rules of creating programs have to be something
that works the way your brain does. For some, that means C, or Perl or
whatever. I can *make* myself do stuff in C, but no matter how much I do
that, it never comes easy, and I can tell you that when I'm done, it's far
more work than it is worth. Same thing with dot languages.
For whatever reason though, AppleScript makes sense to the way my brain is
wired. That's really a rather frightening concept if you analyze it much, so
I recommend against it. Then again, some people write scripts for Eudora,
sober even, and *that* is truly frightening to me, so even scary is
relative.
Contrary to popular belief, I've had rather a lot of experience in other
languages, including some 4GL graphical environments that still make me
think that programming as a whole is far too much in the hands of the
basement dwellers who use it to maintain their geek cred, instead of making
it easier to get work done. People go on about how great automator is, but
to me, it's a crippled version of stuff I was using in 1995.
People talk about how hard it is to do real work in AppleScript, and I don't
get it. There are things that AppleScript is not that good at, but the idea
that AppleScript is a recipe for "long term pain" above and beyond other
languages is just silly. Dealing with the pain that I've seen from stuff
like C, C++, Perl, PHP (Dear GOD, someone beat that language with a security
practices manual), assembly, and even TEH MAGIKKK that is ObjC, well, all
programming languages cause long term pain. It's just a matter of the kind
of pain you enjoy.
I happen to be able to deal with AppleScript's peculiar form of pain well,
so for me, and evidently others, it is a "good" language. Shell is
occasionally good.
One thing I will say that seems to have been ignored is the importance of a
good environment. While you have advanced IDEs for many languages, including
AppleScript, shell is still stuck back in the realm of stone tablets and
pterodactyls. Perhaps if there was an environment on the level of Script
Debugger for shell, it would become a lot easier. I know that if I ever get
serious about Perl, I'll be writing another check to Mark for Affrus.
I would dearly love to see shell development taken out of the hands of the
masochists that currently seem to rule the roost.
--
Should you ever decide to use bamboo sticks and stretchy, decorative string
that¹s designed to wrap presents to make a bow and arrow, and should you
decide to wad up a bunch of duct tape on the end of your arrow and soak it
with WD-40 so it¹ll, you know, burn better, I would recommend not shooting
the flaming arrow onto the roof of a house, or into the lap of your friend¹s
cousin. Even by accident.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden