[Info-vax] BASIC (was Re: 64-bit)

Arne Vajhøj arne at vajhoej.dk
Fri Jan 12 15:09:41 EST 2024


On 1/12/2024 12:26 PM, Dan Cross wrote:
> In article <unqjcn$3c1o2$1 at dont-email.me>,
> Dave Froble  <davef at tsoft-inc.com> wrote:
>> On 1/11/2024 2:42 PM, Dan Cross wrote:
>>> In article <unpa1b$3316l$2 at dont-email.me>,
>>> Dave Froble  <davef at tsoft-inc.com> wrote:
>>>> On 1/10/2024 9:28 PM, bill wrote:
>>>>> On 1/10/2024 7:02 PM, Arne Vajhøj wrote:
>>>>>> The world has evolved.
>>>>>
>>>>> Exactly.  BASIC also evolved, but better languages have passed it by.
>>>>
>>>> I confess to curiosity.  In what ways has other languages passed by Basic?

>>> String handling
>>> seems anemic.
>>
>> Can't let that one go.  Basic in my opinion does strings very well.
> 
> What do you like about it?
> 
> Consider writing a lexical analyzer for a simple expression
> language; what would such a thing look like, in BASIC?  Here I
> want to take a string as input, and emit a list of tokens that
> correspond to the elements of the langauge that are represented
> in that string.

Basic has the fundamental string concept right with dynamic strings.

Maybe it miss a few string functions. Including something for regex.

But it is not that different from Java, C#, Python, whatever.

>>> There doesn't seem to be support for generalized
>>> memory pointers,
>>
>> Correct, Basic does not have any pointer data types.  It does have a function to
>> retrieve the value of a pointer.
> 
> That makes it challenging to implement dynamically sized data
> structures like trees or graphs where the size is not already
> known, or hash tables that use chaining for collision resolution
> etc.
> 
> How would I do these things in VSI BASIC?

Basic operates on arrays via array indexes (like Fortran and Cobol).

And arrays can be resized.

I posted a tree example here 2 years ago.

Pretty? No. Pretty awful looking.

But what does that mean?

It means that Basic is a poor language for teaching fundamental
data structures.

It means that Basic should not be used for all libraries used
by Basic.

It does not mean much for writing business applications. Creating
such data structures are not part of writing business applications.

Arne




More information about the Info-vax mailing list