Friday, March 04, 2005

What Defines BASIC?

When you think of BASIC, what comes to mind?

What is the core language itself? I implemented Liberty BASIC from what I considered to be the essentials of the language. I am not a VB programmer. My own experience programming in BASIC comes mostly from these influences:

* Benton Harbor BASIC
* Applesoft BASIC
* Commodore BASIC

Except for Benton Harbor BASIC, these are early flavors of Microsoft BASIC. They all use line numbers and have these commands in common: LET, PRINT, INPUT, GOTO, GOSUB, RETURN, READ, DATA, IF/THEN, FOR/NEXT, DIM, OPEN, CLOSE, etc. There are also functions like VAL, SIN, LOG, LEN, MID$, LEFT$, RIGHT$, STR$, etc.

They are also all command line interpreters. This is an important feature that is mostly lost in modern BASICs. The interactivity of the language is one of the things that makes it approachable and easy to learn. Most newer BASICs are not interactive, including my own. I'm working on a new BASIC which adds interactive features.

So is there a BASIC standard? In fact there is an ANSI standard, developed by a commitee. This standard BASIC is largely ignored by the community of BASIC implementors. Microsoft has been the biggest influencer in the BASIC space, and their QBasic became the defacto standard for BASIC. Visual Basic has not been able to overcome QBasic's popularity for the casual user and hobbiest. Perhaps QBasic's inclusion of an immediate mode (approximating a command line interpreter's interactivity) is one of the reasons why it is Microsoft's last real BASIC?

I'm interested in your feedback on this. My own thoughts are:

* BASIC has a small core of classic commands. Learn these commands and you should be able to be productive in any version of BASIC in five minutes, or it isn't BASIC.
* New commands should be added with reluctance.
* BASIC programmers should not be required to use GUI elements in their programs.
* The BASIC coder should not have to understand C data types to write a program.
* BASIC should be interactive by use of a command line or other innovative features.
* Extensions to any BASIC should not feel like some completely different language so that someone who knows BASIC looks at code written in that dialect and says, "What the HECK is that?!!"

Your thoughts?


Rogue said...

Funny you should mention the core commands of basic. i have a few friends that are looking into makeing an inturpreter with only the core FOUR commands native to BASIC, end,print,let, and goto. i found that out while looking on wikipedia. so i wrote a simple design, and they're working on it right now.

i'm just doing this for my own personal entertainment, but we plan on building up from that and concentrateing on improving the base commands and useing other functions relectantly.

Programming Info said...

You say your not a VB programmer, and I say there is no such thing as one VB programmer. It must be the only program that takes the output from a team to get it done. I started with TRS-80 Model 1 Basic and moved up through GWBASIC, QBasic, and QuickBASIC. I went on through C & C++ programming up till now. I have tried all Basics and threw them aside until Liberty Basic showed up. I bought it two months ago and I am thrilled about it.

Bob Dyson

Carl Gundel said...

Hey Bob,

I'm glad you like Liberty BASIC! :) Just to be clear, what I meant when I said I'm not a VB programmer is that I've never used VB.

kaixax555 said...

I used Liberty first, then use VB.NET. But I find both good.