Old-school BASIC

We need more programming languages like BASIC. Not the thoroughly modernized, object-oriented, jazzed-up descendants of the language — I mean the original BASIC. Specifically, a language which can be readily understood by anyone reading it who has a background in algebra — and one which can be easily learned in a few minutes’ time.

I recently came across (okay, went looking for and found) the original paper describing 1964 Dartmouth BASIC. It’s amazing how clear the example code is — and how well-thought-out the stated goals of the language are.
Compare the following “Hello, World!” programs in BASIC and JAVA…


BASIC:
10 print "Hello, World!"
20 end

 


Java (Android code):
package com.paad.HelloWorld;

 

import android.app.Activity;
import android.os.Bundle;

public class HelloWorld extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}//onCreate
}

Java (required XML for Android):
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello, World!"
/>
<LinearLayout>


That’s a LOT of crap, just to put “Hello, World” on the screen! Not only that, but how would a beginning Java programmer know all of the names of the required functions, and which parameters they take? Java is supposed to, among other things, shield programmers from the “complexity” of languages like C. I think I’ll stick with the “complexity,” thanks.

 

Not only that, but an additional point of failure has been introduced: the code now depends on a schema that resides on a webserver at schemas.android.com. Should this webserver go offline (for instance, the Android platform goes out of fashion, the organization running the site goes bankrupt or just doesn’t have a good backup policy in place, or whatever), the code is now broken — dependent on an external reference that is no longer there.

This entry was posted in Android, BASIC, Coding, Digital, Java, Nostalgia. Bookmark the permalink.

Leave a Reply