POV-Ray : Newsgroups : povray.off-topic : Tell me it isn't so! : Re: Tell me it isn't so! Server Time
10 Oct 2024 15:15:20 EDT (-0400)
  Re: Tell me it isn't so!  
From: Darren New
Date: 27 Jul 2009 13:30:55
Message: <4a6de44f@news.povray.org>
Warp wrote:
>   The original BASIC was such ... that it was basically frowned upon by
> everybody from the beginning.

Welllll... I wouldn't go that far. It was acknowledged as simplified, in 
much the same way that DOS BAT files are simplified or editor macros are 
simplified. It was designed as a beginner's language, so it wasn't really 
frowned upon any more than LOGO or PILOT is frowned upon.

It was only after people tried to turn it into something sophisticated they 
could continue using for large professional programs with multiple 
programmers that it was "frowned upon", methinks.

>   The original BASIC didn't even have the concept of functions.

And many of the languages of the time didn't have recursion even if they had 
functions. :-)

>   Goto was an inherent part of the language, and used extensively. This,
> naturally, also caused criticism, 

Except that BASIC was invented a couple years before structured programming 
was, so this was only a criticism a decade after BASIC was popular. It also 
started out with only what you might call "computed if" statements. I.e., 
the only valid thing after a "then" or "else" was "goto".

>   Even if we took goto as barely acceptable, its original implementation was
> very ascetic. AFAIK the original BASIC did not support named labels, but
> instead every line of code was numbered (by hand by the programmer), and
> gotos always jumped to a specified line number. AFAIK the numbering of each
> line was mandatory.

Yes. BASIC was revolutionary in that it had its own editor built into the 
language, which was pretty nice in the days of punched cards and paper tape.

> Naturally this made it quite problematic to insert code
> between existing lines. While it was customary to number the lines in
> multiples of ten, this only gives the possibility of inserting 9 lines
> of code between any existing lines. If you run out of line numbers, you
> will have to start renumbering.

It also contributed to the spaghetti code, because if you ran out of lines 
and didn't have a automatic renumbering program, you'd put a subroutine 
somewhere, gosub it, and then return. Like patching assembly code. Good 
thing all the variables are global. ;-)  That's why serious people used 
counts of 100 instead of 10. ;-)

>   Control structures were ascetic and limited, as well as the possibility
> of creating things like data containers.
> 
>   It's no serious programmer ever bothered with BASIC.

Not if there was a reasonable choice, and not if you had more than one 
person working on the program. Unless you were just learning how to program.

Actually, I worked with lots of serious programmers that did extensive work 
in BASIC. They were all people I didn't consider very professional, tho, and 
the programs were fairly small compared to what you see for even a simple 
program nowadays.

Except for the ones doing BASIC on the microcomputers, where it was actually 
pretty good, since it was the main supported "high level" language. People 
did some neat stuff in spite of the limitations.

-- 
   Darren New, San Diego CA, USA (PST)
   "We'd like you to back-port all the changes in 2.0
    back to version 1.0."
   "We've done that already. We call it 2.0."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.