BASIC vs Python

Adam DePrince adam at cognitcorp.com
Fri Dec 17 13:27:10 EST 2004


On Fri, 2004-12-17 at 01:49, Andrew Dalke wrote:
> Adam DePrince
> > During the 1980's BASIC was the language to embedd into the ROM's of the
> > computers of the day.   This was in a misguided effort to make computers
> > understandable to their target audience.  The goal of the day was to
> > build a system that a manager would want to buy; it was believed that
> > the only way for a manager to see the value of a system was to make the
> > language understandable to said manager.
> 
> That doesn't sound like the 1980s I remember but I was biased
> because I those included my teenage years and I wasn't a manager.
> 
> I though part of the market was for parents of kids like me.
> In my case I learned from the book that came along with the
> computer.  I remember how confusing arrays were ("By default
> it only takes numbers between 1 and 10, so I should be able
> to use 2.5, right?").  I don't think I could have handled
> UCSD Pascal on my own nor the other languages available at
> the time.

Sure you could have.  There is nothing I hate more than the dumbing down
of technology for the sake of families with children.  Having kids
doesn't make you dumb, it only makes you feel that way when you realize
how quickly your children's technical prowess with outstrip your own.

To Apple and Atari this was true, maybe, but other companies had their
sights set on the much more lucrative industrial market.   Many
companies had "business" versions of their home PC's.  Tandy, Commodore
PET, etc etc.  

> 
> Editing BASIC is also dead simple to read and to implement
> on a machine with a few K of RAM.  Compare to EDLIN for
> DOS or other editors of the era.  That's the era of WordStar
> and the ^K^B and ^K^K control character commands.  Again,
> not something a beginning solo student programmer can
> likely pick up easily.

Simple and cheap to implement for sure, terribly obnoxious to use. 
There was nothing preventing the implementation of a proper
edit/compile/execute cycle in 16k.  My Tandy 102 has a special "basic
editor" mode where it basically dumps the basic program into the text
editor and "compiles" it to its intermediate representation when you
leave.  They could have just as easily used a real language.  Sure, it
had 32k, but that was also used for its file system.  The basic editor
worked fine with just 1kb or 2kb of memory remaining.  

> 
> The BASICs of my youth also supported graphics and sounds.
> 
>   PLAY "CGFED>C<GFED>C<GFEFB"
> 
>   HGR
>   HPLOT 0,0 to 20,40
> 
> Twenty, yes *20* years later there's still no standard
> module for Python for doing the sound effects I could do
> on my old TI 99/4A, even without the hardware speech
> synthesizer (fun for Parsec and a few other games :)

The operative word being standard.  TI 994/A BASIC was hardly standard
BASIC.  Sound and graphics have no place in a base language definition;
use an add on module for that.  

For the record, Python does have graphics in its base distribution -
TK.  Search freshmeat and you will find ample sound libraries that could
be plugged in.

Perfection is having nothing else to remove; TI BASIC's bells and
whistles hardly made up for the lack of fundamental expressiveness
available in a language like Lisp or Forth.

If you really miss the pc speaker style music, it isn't too much trouble
to: open( "/dev/audio", "w+" ).write( my_sample )

> 
> > In BASIC you literally list the steps the computer will follow.  Each
> > step gets a line number.  Decisions are controlled by jumping to
> > different "line numbers."  No where in the language was there any notion
> > of or ability to make your program remotely abstract.  You know those
> > jokes on slashdot.org that read:
<snip>
> > Each language carries with it a philosophy.  BASIC stands alone in being
> > so utterly perverse that learning it will render you completely
> > unmarketable, except as a basic programmer, as you unlearn its
> > limitations and learn how to think in the abstractions of every other
> > language.  
> 
> Which was just fine with me.  I learned Pascal in Sr. High,
> C in college (and C++ and Fortran) and didn't get paid to be
> a full-time programmer until 3 years after I graduated college.

I don't understand, are you presenting yourself as an example of my
assertion?

> 
> 
> > Perhaps I can best illustrate the difference between the two with an
> > analogy.  Suppose you came to me and asked which was a better way of
> > learning a foreign language, the python way or the BASIC way.  
> 
> > The Python way would be how a language is taught in any normal class
> > you might find at a local college.  You learn the vocabulary, grammar,
> > history and culture of the language.
> 
> Let's try this recasting of your analogy.

You don't really think my intent was to be objective and unbiased?

> 
> Given the hardware constraints of the early 1980s, which
> language do you think should have been used instead of BASIC?

Lisp
Forth

Thank you for feeding me.

Adam DePrince 





More information about the Python-list mailing list