Wednesday, April 27, 2005

BASIC, not BATAP

This blog is about BASIC, which means Beginners All purpose Symbolic Instruction Code. If it were about Being All Things to All People, the language would be call BATAP. ;-)

I'm inspired to write this because of the plight of General Motors. The world's largest auto manufacturer is losing money in droves. The reason is in their name, the first word of which is General. The problem is that there is so much competition in this world today, that being general is not a strength. If you want to get people's attention, you need to specialize.

BASIC also needs to specialize. The key ideas it needs to specialize in? Easy, simple, approachable, and fun. Does it have power? Yes. It has the kind of power that gives the average person the ability to program computers because of the four qualities I just listed. When Microsoft created Visual Basic (now officially unsupported by the way) they took BASIC out of the domain of the everyday person and tried to make a professional tool out of it. They should have called it Visual BATAP.

BATAP can never be BASIC.

Sunday, April 03, 2005

BASIC Overloaded?

One reader posted a comment to my last post on the cult of complexity. He remarked on how the OPEN statement in Liberty BASIC is used to open not only disk files, but windows and DLLs. He expressed his desire for a further extension of OPEN for managing TCP/IP sockets. The thing is, I have been planning to do this for some time, and expect to see it in Liberty BASIC v5.0 when it makes its debut.

Using a command for many different things is called "overloading" by programming language designers. So, the OPEN statement is overloaded in Liberty BASIC. This is one of the techniques I use to try and keep BASIC small. I could have added more commands. Maybe for opening a window I could have added CREATEWIN and for accessing DLLs I could have added MAPDLL or some similar name. This might have been okay, but it doesn't keep the language small. I think is crucially important to minimize growth because of the ever expanding list of things a programming language is expected to handle. If I don't fight growth, pretty soon Liberty BASIC will be unmanagable.

If you have ideas that are very close to each other (like opening a file, a window, a socket, etc.) it makes a lot of sense to overload the commands that access them. This can be taken too far, but usually I believe that it isn't taken far enough. Programming languages need to be more general.