Friday, May 20, 2005

Why languages like BASIC are important today

I think it is important that most programming can be done with simple tools. BASIC fits well with the idea that it should be as simple as possible, but no simpler. The average person cannot commit to learning programming languages that need several thick books to explain them. Before you can get anywhere, you need a language that's comfortable to start with. How else can QBasic's tremendous staying power be explained? The last version of QBasic rolled out of Microsoft 13 years ago, and a quick Google search for QBasic reveals nearly a half a million hits!

I also believe that there is a lot of arrogance in the established programming culture. Many software professionals (some of whom aren't especially good at what they do) look with disdain on the users of "hobby languages". Not everyone who writes software does so as their sole profession. Some people need to write small programs for their own use, and so they can be the sole judge as to whether the software is good enough. Other people will only program for fun, and they should not need to answer to anyone.

Once when I gave a demo of Liberty BASIC to a fellow programmer, his response was, "Who would want to use that?" To him it seemed like a toy. He doesn't understand that not everyone needs or wants all the power and complexity of C++.


John said...

Most programmers owe much to the BASIC language. More then a few of them got their start with BASIC, and a large percentage of them still use different dialects of BASIC to "do the dirty work".

As time goes on, programming languages will have to do more, and be more powerful. Thats just the nature of things. The true "power" of any language, however, is in the hands of the user, and their understanding and use of the language.

Before deciding on Liberty Basic, I looked at many of the latest "basic like" programs. While many of them work well enough, some were quite complicated to learn, lacking quality documentation and tutorials, with somewhat confusing working environments.

I haven't posted code on the forum, nor have I asked for any help. Is that a measure of my own shyness, or lack of ability, or just maybe, could it be that the answers to my questions are already there?

In my opinion, the power of Liberty Basic is a combination of a great program, great tools, top notch documentation, and friendly help when needed, not to mention the short learning curve.

I don't have a collection of books on programming, just "Beginning Programming for Dummies" like me. I suppose I could go out and buy the 20 volume set on .net, and spend the next 30 years of my remaining 10, learning all that fancy stuff. I have found, however, that I can write good (in my opinion) software with LB, and if I need speed or extra power, I can always call Alyce's Programming Instructions for Detached Language Logic (API/DLL).

Looking forward to the next version. Regards, John

Dave B. said...

I really like Liberty BASIC and I have been using it for a long time now. It is very easy to use and learn and I've done a lot of complex programs in it with relative ease.

It does lack some abstraction, however, and that seems to be its only flaw. It has the best support community and resources of any of the BASIC clones out there.

So what is abstraction? Basically, keeping the details of something from the user (unless they are needed). Sending text to the clipboard should be as simple as: SetClipboardText("My Text"). In LB it takes a paragraph to do this.

I recently started using another of the BASIC clones (out of necessity) and have been able to reduce programs written in LB by two thirds. 2.5 pages of tool tip definitions became as many paragraphs. That's the power of abstraction.

Abstraction also means expanding the language and that is something Carl seems a bit reluctant to do. But increasing the number of keywords (something required by abstraction) does not increase complexity. The syntax for using OPEN to open dlls, files, and COM ports is more complex than having separate commands for each like: OpenDLL(ddlname), ReadFile(Filename), OpenCOM(port)...etc.

Here's a comparison:

LB: open "c:\readme.txt" for input as #f

A more abstract language: Result = OpenFile(#F, "c:\readme.txt")

The later example gives you feedback as to whether the file was successfully opened or not AND read/write functions can both be performed on the file. If the file is to be read only, then ReadFile() is used.

This sort of abstraction and modularity is a proven concept and it is where all the BASIC clones should be headed. I hope LB will head that direction too. I miss using it.

Carl Gundel said...

Liberty BASIC's market is not the professional programmer. I would be in peril in the marketplace if I tried to compete with professional tools. There is simply too much competition there, and turning my back on my user base would generate ill will.

I agree that adding more commands can be good and sometimes it's necessary, as long as they are not just piled on. Liberty BASIC has grown substantially over the years.

Each new command should be considered carefully, and the bias should be against adding. Perhaps the clipboard functionality you mention would be a good choice. On the other hand, changing the syntax of BASIC to make it more like C (the file opening example) is a definite misstep IMHO.

Dave B. said...

If you read my comment carefully, I am not advocating changing the syntax to something more like C++. I am advocating adding more commands to the old-fashioned, traditional, BASIC vocabulary because it is needed (in contrast, C++ has a limited vocabulary).

While I am greatful to where BASIC has lead me, I don't have any desire to remain in the past with the limited functionality of a more traditional BASIC vocabulary out of nostalgia, nor am I advocating the missteps of Visual Basic and the blunder of .Net. The BASIC clones have an opportunity to fill the gap left by VB. The question is: Who will step up and do it.

Alex L. said...


Adding commands makes the runtime bigger. You have stated that you don't use sprites, but that does not mean that the overall size of the program is any smaller than a program that does, because the runtime stays the same.

Now, functions add functionality (surprise!) without having to make the runtime bigger. Why not make a function that Set the clipboard text, then post it to the Public Domain board. That way, any time anyone wanted to use it, they would just need one line...sounds good to me.

Furthermore, LB5 will have user libraries, so you can make an LB function library, and use that instead of having to put the functions into your code file! Now there's a cool feature!

Affordable Luxurious Wedding Dress Blog said...

cheap wedding gowns,
discount bridal gowns,
China wedding dresses,
discount designer wedding dresses,
China wedding online store,
plus size wedding dresses,
cheap informal wedding dresses,
junior bridesmaid dresses,
cheap bridesmaid dresses,
maternity bridesmaid dresses,
discount flower girl gowns,
cheap prom dresses,
party dresses,
evening dresses,
mother of the bride dresses,
special occasion dresses,
cheap quinceanera dresses,
hot red wedding dresses