Monday, May 19, 2008

Rewrite BASIC language today?

In the Usenet group alt.lang.basic there was a thread recently with the subject heading "Rewrite BASIC language today?" where the question was explored about how BASIC would be written in today's programming world.

Clearly there is a wide range of opinions in the responses. Some opted for being retro and simple. Some advocated adding commands for dealing with various things. It's good to have a discussion about these sorts of things, and this one went well. There are a lot of experienced BASIC programmers in that forum and it didn't turn into a flame war.

In my own response I wrote "BASIC needs to be simple. Adding C or Java features is a mistake for the most part. There is value in keeping things out of the language."

There needs to be a balance. Sometimes it makes good sense to add new things to a language. But as I just said... sometimes. ;-)

3 comments:

Unknown said...

I definitely vote for simplicity - a small subset of easy to define and understand commands. Here is an example to me of the good and the bad in the simplicity contest:


Bad: PERL and Arrays/Hashes
---------------------------
@array = ((1,2,3),(4,5,6);
This creates a 1-dimensional array of 6 numbers

@array = ([1,2,3],[4,5,6];
This creates the expected 2-dimensional array.

Accessing an element:
$array[0][1] - we must remember yo change the sigil (say what) depending on what we are accessing.

@hash = (key1 => "val", key2 => "val2");

Etc, etc!


Good: PHP
-----------------------
Arrays and Hashes are the same. An array is just a hash with the keys as numbers.

@list[5] = "Five";
@list["five"] = 5;

Use them how you want!




PHP and Arrays, hashes

Hweyun said...

REM Hi Carl,
REM ********

LET ME = ((I am not a programmer) AND (I am NOT(not a programmer))):

LET YOU = ((You are a programmer) AND (a great writer AND thinker)):

REM It's the First time that I see a real programmer.
REM That he's normal. down to earth.

REM Thank you so much for your blog, it is really helpfull. I learned a lot.

Unknown said...

Sorry, this is not related to your posting. I saw that you have a counter on your blog and would love to put that on my blog site. I was wondering where or what website that you got the counter.

Thanks,

Gilbert
gilbertstevens@hotmail.com