Oct 98 Viewpoint
Volume Number: 14
Issue Number: 10
Column Tag: Viewpoint
October 1998 Viewpoint
by Nicholas C. "nick.c" DeMello, editor@mactech.com
When I was in high school, I wasn't really interested in computers. But, somewhere
along the way I did learn BASIC and I had a lot of fun with it. In college, someone took
the time to explain to me that BASIC wasn't a real programming language, that if I
wanted to get serious about programming I needed to learn Pascal. For some reason, I
bought that, and went off to figure out Pascal. Eventually, I migrated on to C, then
C++, and I am now making periodic forays into Java. I've come to form the opinion that
all these languages are the right tools for certain jobs - except BASIC, which I never
gave more thought (after all, it wasn't a real programming language).
Recently, I came across an exciting program that is selling well in a niche market. The
folks who created it are making a comfortable living selling this professional
software, and asked me for some feedback about the feasibility of porting their
program to the Macintosh. They sent me the code, I popped open the archive and found...
BASIC.
Well, I guess the conclusion here is obvious, these folks had missed or ignored the
wisdom that was imparted to me on what constitutes a real programming language, and
gone out and built a professional, popular program that they make a living from.
Amazing what you can do when you don't know that you're not supposed to be able to do
it. It kind of reminded me of two guys in a garage building a computer company, despite
common sense. It definitely reminded me of all those times that folks suggested I get rid
of my Macintosh and buy a real computer.
So, properly chastised, I've been taking another look at BASIC.
BASIC on the Macintosh is in good shape these days. We're reviewing a new BASIC
development system called REALbasic in this issue (it looks good), and we're planning
on reviewing other BASIC products in upcoming issues. Future BASIC II was a finalist
at the Macworld awards this year, Mainstay recently released version 2.5 of
VIP-BASIC, and Visual MacStandardBASIC is currently one of the hottest selling
development products I've seen in a long time. There are plenty of tools out there for
using BASIC on the Macintosh. When you consider how easy BASIC is to learn, and how
quickly you can start turning out applications with it, it's not at all surprising that
BASIC is one of the most popular computer languages of all time. Next time I need to
create an application or utility, I'm going to give some serious thought to whether or
not BASIC might offer a quicker, and equally effective way to generate a solution.
It seems these days that folks are starting to appreciate a lot of simple solutions,
which aren't classically thought of as real, iron-man programming. AppleScript is
another example.
The AppleScript Developers kit (AppleScript 1.0), was first released in May of '93,
but it wasn't until late in '93 that it shipped with a Mac OS release (System 7 Pro).
Version 1.1 came out in early '94, and was later included with the System in 7.5. Then
things seemed to coast for a while. My guess is that Apple was waiting to see if
developers would bite, and developers were waiting to see if Apple would drop it.
Developers have begun supporting AppleScript in their applications, cautiously, but
continuously. I guess we hit critical mass at some point, because things picked up at
Apple around July '97. The finder was made scriptable with Mac OS 8, which also
included the first public release of AppleScript since early '94 (AppleScript 1.1.2).
Now things seem to be speeding up. In 8.5, we're expecting a fully native AppleScript
engine which looks like it will offer a ten fold runtime speed.
AppleScript has often been referred to as Apple's best-kept secret. One of the reasons
it was created was to allow users to automate and control their workspace with easy to
use, easy to understand scripts. Unfortunately, users didn't seem to get the message.
While AppleScript has been around since '93, for years I've gotten confused
expressions from users when I mentioned it, and downright shocked expressions when
I told them a given application required it. It's taken a long time, but it's starting to
look like Apple's little secret is coming out.
Apple had an entire section of their '98 New York Macworld booth dedicated to
AppleScript (it may have been hard to spot, there was this constant crowd of folks
around it blocking all the signs). Also, I've noticed that more and more applications
these days are not just scriptable, but are replacing, or supplementing parts of the
program that were written in C with "scripts" menus (for example the AppleScript
menu in MailSmith or DragThing).
As someone who grew up in a Unix world, I'm intrigued by the trend. I can see a lot of
reasons for it. AppleScript, like BASIC, is (IMHO) a lot quicker to write than C,
quicker development means faster to market. It's also more flexible, and allows you to
modify code after the compile (in much the same way resources let you modify data
after compile time). Using both languages in the app means that you can choose where
you need the speed of a compiled function, and where you can use the flexibility of an
interpreted script. But, perhaps the most intriguing part is that it allows you to share
and exchange scripts in much the same way OpenDoc promised the ability to share and
exchange part handlers (the same way a dozen Unix programs might use the same
program to edit text). Finally, extensions are going to be a real problem in system
8.5, with its protected memory. AppleScript just might offer the solution to many of
the problems we rely on extensions for now (program initialization, system
modification, and interapplication communication - for example).
I guess the bottom line is that I've learned something about what defines a real
programming language, and gained a new respect for, and interest in BASIC and
AppleScript. That new definition: whatever works.