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:18:19 EDT (-0400)
  Re: Tell me it isn't so!  
From: andrel
Date: 27 Jul 2009 14:04:34
Message: <4A6DEC33.3070508@hotmail.com>
On 27-7-2009 18:56, Warp wrote:
> clipka <nomail@nomail> wrote:
>> Not really the most modern of languages (unless you count VB/VBA, but as you say
>> yourself these are actually totally different beasts), and indeed one of the
>> most frowned-at languages (VB/VBA included in this case); I guess that's mostly
>> undeserved
> 
>   The original BASIC was such a simplistic scripting language compared to
> way more advanced programming languages of the same era (including such
> masterpieces as lisp, which was surprisingly advanced and high-level taking
> into account it was invented in 1958) that it was basically frowned upon by
> everybody from the beginning.

As was Pascal, dismissed as 'just an educational language' that was not 
useful for real life projects.

>   The original BASIC didn't even have the concept of functions. It had a
> very primitive version of them, subroutines (which are like functions which
> don't take parameters nor return anything, and without any local scope).
> The only thing which differentiated a subroutine call from a goto is that
> the subroutine call pushed the caller's address onto a stack, so that a
> "return" statement could return there when the subroutine ends. But that's
> about it.
> 
>   More jarringly, every single variable was global. The concept of local
> variables was inexistent, obviously because of the lack of proper functions.
> 
>   Goto was an inherent part of the language, and used extensively. This,
> naturally, also caused criticism, as liberal use of gotos easily disrupts
> the logical flow of code and makes it harder to follow and understand, even
> if the obfuscation is not intentional.

Some historical context: BASIC is from 1964. The famous 'Go To statememt 
considered harmful' dates from 1968. At the time of design goto was 
excepted and even the norm. You can't blame the designers for that. Not 
even with 40+ years hindsight.

>   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. 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. And good luck trying not to break existing
> gotos if you start renumbering. (Some later BASIC text editors supported
> automatic renumbering, including all gotos, but naturally no such editors
> existed back then, when even having an interactive text editor in the first
> place was luxury.)

Indeed, when I started at uni ('82) I had to use a line editor for my 
programs on the mainframe. At home and elsewhere I had been using full 
screen editors for many years.

>   Control structures were ascetic and limited, as well as the possibility
> of creating things like data containers.

If you look at what the design constraints were you will find that it 
perfectly fitted. As much as everybody would have loved to have more 
expressivity it would not have fitted in the ROM of these days.

>   It's no serious programmer ever bothered with BASIC.

On the contrary, many did. Those that were designing software that had 
to run on cheap general purpose computers like Apple II and the 
Commodore PET series and the like. Many very serious programmers were 
involved in writing BASIC interpreters and compilers. Perhaps the only 
place it was not as much used was in the just starting computer science 
departments of those days. And if they didn't it was more because they 
had no feeling with the real world outside than anything else.


Post a reply to this message

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