Friday, October 23, 2009

What defines a BASIC?

You are probably aware that the name "Yabasic" stands for Yet Another BASIC. If you know your programming history, you will also be aware that BASIC is an acronym for Beginners' All-purpose Symbolic Instruction Code. Today, we have a huge body of "BASIC" dialects which bear little or no resemblance whatsoever to the original BASIC invented over forty years ago. The question is, are they actually BASIC languages at all? If the answer is yes, then this might lead us to ask another question: what defines a BASIC?

I want to focus briefly on the term "beginners". It would seem to imply that BASIC languages have a target audience of beginners, but I would argue that now this is not the case. Certainly, BASIC was originally a beginners' language, but it has evolved so much that there are now very complex, powerful dialects which are not particularly suited to those with no prior exposure to programming.

It is interesting to note that BASIC, in its early days, was used primarly within the confines of universities and colleges. This meant that "beginners" actually had at least some experience in operating computers, and, presumably, some familiarity with basic computer theory. Nowadays, we tend to apply the same term to those who have little or no experience in either programming or computer theory.

Then we have the term "all-purpose". Obviously, the original BASIC was not "all-purpose" as we know the term today: it was used mainly to find the answers to various mathematical problems. Nowadays, we have games, editors, and scripts written in a variety of "BASIC" dialects. Most modern "BASIC" dialects do not even attempt to be "all-purpose": it is widely accepted that different versions are better for accomplishing different objectives. However, the widespread use of BASIC variants in many different, diverse fields seems to have proved that the "BASIC" concept is, indeed, "all-purpose" to a large extent.

So, what defines a BASIC? Is it syntactical conventions or the longstanding print statement? Or a philosophy shared with the original BASIC? Or an ever-diluted (or ever-enriched) heritage? Or is there no definition, and the label "BASIC" is only widely used because it is an effective, respected "brand name"?

What might the future look like? How might "BASIC" dialects look in a decade, in two decades from now? Will they still deserve the label "BASIC"? What changes might have taken place? What changes should have taken place?

There is one more very interesting question that I would like to open up for discussion: should there ever be a limit on how far a language can evolve? If a new and potentially very useful feature could be added to a language, but only by significantly or drastically altering it, should it be implemented—or left for another, completely separate programming language to implement?

(I should apologise, by the way, for the shortness of this post; I was extremely busy during the past week. I would love to hear your ideas for future posts: please e-mail me at larsen.thomas.h @ gmail.com, or else use the comments system.)

1 comments:

  1. I think it requires a delicate balance. BASIC was never as clear-cut and sharply defined as Pascal or C, but rather "blurry". (Interestingly enough, "blurriness" of the code seems also to be a feature of BASIC syntax...)

    So, while I'd say there is a number of features inherent to BASIC (Low declarative overhead, memory management done by the interpreter, case insensitivity, DATA statement, typing done with special characters suffixed to the variable name, no curly braces, ...), it is easy to imagine a Pascal-BASIC- or FORTRAN-BASIC-hybrid, where it would be difficult to decide if this is still BASIC. Also, let's not forget that these days we do without a lot of features which would in the 80's have been quintessential to BASIC, like line numbers and GOTOs.

    Hence, in principle I would say that a new feature is a good feature, even if one "departed" to some extent from the path of The One True BASIC(tm) -- as long as it makes the programming task easier. OTOH, it would be a mistake to try to make the interpreter a universal tool which can do *everything*.

    IMHO a language is perceived the better, the clearer the design philosophy behind it is. A wise man once said that all languages which have a dedicated followership were developed by individuals (C, Pascal, Python), while those developed "by committee" are usually held in disdain (Java comes to mind). My take is this is due to the fact that if one can feel the author's "signature" in the interpreter, the programmer can follow along the lines of the author's thought, and will more readily understand what is feasible, and how an end can be achieved.

    So, to make my philosophical essay not overly long, don't try to please everybody and include everything. Implement what you think works well. Bear in mind what people expect from BASIC: Ease of use, general purpose, manageable vocabulary size.

    (A more concrete question is of course how compatible Yabasic 3 should be to the older versions...)

    Two cents.

    ReplyDelete

Note: Only a member of this blog may post a comment.