> On Monday, May 5, 2014 2:41:51 PM UTC-4, Michael Black wrote:
>
>> It was of course an interpreter (or was it? I seem to recall debate about
>> whether BASIC was originally an interpreter) and interactive. So saving
>> to disk made sense.
>
> Over the years, BASIC has existed as both an interpreter and compiler.
> I think the differece was largely transparent to most users in a time
> sharing environment.
>
It would really depend on compile time. I remember trying C on a 2MHz
Radio Shack Color Computer 3, and it just took forever to compile even a
simple program. On the other hand, BASIC09 that came with Microware OS-9
had the ability to compile to a pseudo interpreter, and that compile took
really no time.
The point of an interpreter is that you can type something in and try it
immediately. Not such a problem today when everything is so fast, but in
the days of a few MegaHertz clocks in computers, changing even a simple
thing could be a big issue if the compile took long enough.
Since BASIC has been promoted as an interactive languague in the forty
years since I first heard of it, and that early appearance of BASIC was on
a timesharing system, it's hard to fathom BASIC as a compiler, even if the
history books say it was originally.
> I'm not sure why that would make any difference in regard to saving the
> program. Compiled programs were always recompiled upon entry of the RUN
> command.
>
I admit I'm colored by never having access to BASIC until 1981, and
learning assembly language (and assemblying by hand) before that. I never
wrote anything serious with BASIC, I kept thinking of the overhead. But
it was great to try things, type something in and run it immediately, and
indeed in the Microssoft era, you could type single lines in and run them
by pressing "enter".
In that environment, learning/playing rather than creating programs to do
useful things, paper tape seems too permanent. You'd write something out,
but then never use that, or never use that version. Again, this is
probably colored by using BASIC as I did, on a home computer.
> IIRC, on HP-2000 BASIC, there was an option to save a binary version of
> the program to speed usage, but again, I'm not sure if that made any
> signficiant difference.
>
Interpreters were generally fast enough for what was needed, but compiling
took time. It's different if one is working on a program for release,
where you put time into the finished product, compile it once and then
release it.
> There were both compiled and interpreted versions for the Microsoft
> BASICs. The "QBASIC" included with MS-DOS was interpreted. The
> QuickBASIC 4.5 or BASIC 7.0 were compilers, which the capability to
> create and save an .EXE module that could be run independently. A
> compiled program ran noticeably quicker than the interpreted version if
> it was doing a lot of work. Compiled QB 4.5 programs ran incredibly
> faster on later era machines. However, I don't know if they'll work on
> the latest Windows DOS which is 64 bit.
>
> (The QuickBASIC compiler was for light duty use and inexpensive to purchase. The PDS BASIC was for industrial use and expensive. It had a few more features. Probably not worth the extra cost unless one really needed those extra features. I bought it, never used it at first, and when I finally did the disks wouldn't read in. M/S said too bad, even though I was a registered user and it cost serious money.)
>
> Later MS came out with Visual BASIC. I think again there were interpreted versions for student use (like the VB that came on a CD in the textbook), and a compiler for more serious work.
>
>
>> Also, since it seemed to be more a language to get familiar with
>> programming basics (and learning bad programming habits according to
>> some), it was less about producing something, and more about learning.
>
> BASIC was intended as both a teaching tool AND about producing results.
>
And once BASIC became mostly an interpreted language, it just seemed way
too bulky to do create any useful programs except very simple ones. I
shudder at the concept.
People used BASIC, at least in the home computer era, because they didn't
wnat to learn something better. It was a makedo language at that point,
every computer came with Microsoft BASIC in ROM after a certain point, so
they had it, and everyone said "for beginners, it's best to start with
BASIC", so endless programs appeared in the hobby magazines in BASIC, lots
of things never worth typing in.
> BASIC was an excellent teaching tool in that it allowed students to
> understand the fundamental concepts of computer programming without
> wasting a lot of time on unnecessary esoteric details. For instance, in
> FORTRAN, one must learn the difference between REAL and INTEGER
> variables and the naming convention, and how to use a FORMAT statement
> to get anything in and out. It's not necessary in BASIC unless one
> wants to get fancy. BASIC users did have advanced features of the
> language if they wanted to do more sophisticated stuff.
>
No, it was so they could plunge in and try things, seeing results
immediately. The cold reality is that I never had problems learning
assembly language because I had a KIM-1 that I could single step the code,
seeing what actually happened. By the time I got a computer that ran
BASIC, 2 years later, there was little reason to use BASIC other than as a
sort of calculator, running single lines in immediate mode. But I do know
I learned it the same way I learned assembly language for the 6502,
looking at the "instruction set" and trying things to see the results.
> BASIC did not teach bad programming habits.
Just the other day someone here quoted someone about bad programming
habits. And whatshisname was quite the critic of unstructured language,
and BASIC lacked the ability to be unstructured. Early implementations in
the home computer age made things bad, if you didn't have the ability to
renumber, then when you ran out of space between existing lines, you'd
have to start making spaghettti code. I remember that stuff in the
magaiznes.
BASIC made it easy for people to "write programs", but then they thought
they had something of value to release to the world, without really
graspoing concepts. Something harder like assembly language forces one to
learn more than the rudiments (no safety from an interpreter there), and
likely makes someone a better programmer.
> >
> As to producing results, it was certainly used by businesses to get
> results. GE Timesharing was a big business for many years. Further, it
> was very useful for computations in an academic environment--one could
> do some heavy numeric analysis with just a few BASIC statements.
> Today, BASIC remains very useful for quick and dirty programs in certain
> situations.
>
Since I can compile a small C program in as little time as it took to run
a simple BASIC program under an interpreter, one can do simple programs
and avoid the problems of decades ago.
Michael