POV-Ray : Newsgroups : povray.off-topic : Tell me it isn't so! : Re: Tell me it isn't so! Server Time
10 Oct 2024 17:18:42 EDT (-0400)
  Re: Tell me it isn't so!  
From: Warp
Date: 27 Jul 2009 12:56:36
Message: <4a6ddc44@news.povray.org>
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.

  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.

  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.)

  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.

-- 
                                                          - Warp


Post a reply to this message

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