VisualBasic

ThoughtStorms Wiki

Convert from VB6 to VB.NET

Quora Answer : What is your review of BASIC (programming language)?

May 20, 2020

In its time, the language was great for its niche of being a beginner's language.

Initially it was pretty similar to FORTRAN but a few keywords were slightly more "intuitive" for beginners.

It had the virtue of being interpreted, meaning no compile phase or compile-time errors. Errors happened as and when you hit them.

Since then, BASIC's fortunes, as is often the case, owe more to the environment it lives in than the language itself.

BASIC was lucky that it got to colonize two very important environments.

In the 1980s it was the default language of the first cheap 8-bit personal computers.

And in the 1990s, Visual Basic made it the de facto language for application programming in Windows.

In the first of these niches, BASIC's status as an interpreted language was a crucial virtue it brought. And computer makers ensured that it was native to, and tightly coupled with the machine itself. Putting most of the machine's capabilities under the control of the language. So you could typically access the screen directly (eg. PEEK at and POKE graphics into screen memory) grab live data about keys being pressed on the keyboard with INKEY$, access whatever sound chip the micro had, even peripherals like joysticks.

None of these capabilities are fundamental to the BASIC language. And had the computer companies of the time chosen a different language, they'd have added the same facilities to that language. Nevertheless, this made the programming environments of those early micros quite powerful and convenient compared to, say, trying to work with something like C where you'd need to include these facilities from special libraries.

Also, BASIC at that time was a fairly fluid language ... increasingly borrowing ideas from ALGOL and PASCAL etc. BBC Basic had block-structures for things like if-then-else, and used defined named subroutines and functions. These became pretty standard in BASICs by the late 80s and 90s, but weren't part of the language in the 60s and 70s.

I wrote more about Visual Basic in the 90s on Phil Jones (He / Him)'s answer to What are the uses of Visual Basic?

So in the 80s and 90s, BASIC was a very easy to use, and convenient way to get stuff done on the platforms you wanted to.

BASIC had also become a fairly up-to-date "structured programming language" with blocks. And by the 90s Visual Basic brought in some basic OO ideas like classes.

However, I want to emphasize that little of this is really part of the language's DNA. Unlike FORTRAN and COBOL etc. I don't think BASIC has ever had much of a standardization effort. So BASICs vary widely in their capabilities and usefulness. You can't say that BASIC is now OO. Or even that it's not always going to have DEFinable functions or block-structured IF. I mean, it probably does most of the time, but a BASIC might not.

Like most people of my generation, I learned to program in BASIC on 8-bit micros. Initially Tandy Level II, and then BBC Basic. It was fun and useful.

But I can not imagine any circumstance where I would either use BASIC today. Or recommend anyone else bothering to learn it.

The last BASIC of any real importance was Visual Basic DOT Net. And from what I saw of that, it had more or less stopped being BASIC at all in any meaningful sense. It was now a compiled .NET language. And more or less C# with BASIC-like syntactic sugar. If you are going to write on .NET in Visual Studio and have to compile, and think in terms of Microsoft's frameworks anyway, then I'd just go straight to C#. That's a much more common syntactic sugar. (Part of the same family as C, C++, Java, Javascript, Perl, PHP etc.)

Today, the obvious teaching language, and get stuff done language is Python. Python is better in every way than BASIC. It has a far more beautiful and elegant syntax. It has more logical and powerful semantics. Python is not a standard. But it is an open-source project. So Python is more or less the same everywhere (apart from some minor incompatibilities between version 2 and version 3)

It has a major modern ecosystem of libraries, package managers and package repositories, and editor support. It's in many important and exciting places, such as JuPyter / scientific notebooks, machine learning environments etc.

Python is not so great for important platforms like the web-browser or mobile. But neither is BASIC. Javascript is your default choice for the browser, and increasingly acceptable for mobile.

Bottom line. My review of BASIC programming language in 2020 is "Ignore BASIC. Learn Python"

The only place that just might be worth writing Basic, is VBA in Microsoft applications. But I believe that Python is coming to Excel soon.

Quora Answer : What made BASIC a good language to learn programming?

Aug 15, 2018

BASIC, like Python today, which is its obvious successor, was a language that was more concerned with just "getting out of the way".

It didn't try to teach a new paradigm or embody a new theory of programming. Or be built from minimal components. It wasn't trying to discipline you. Or "do damage to your psyche" as Richard Bornat famously told us first year computer science students that his "Learn to Program with ISWIM" course was meant to do.

It just took bog-standard programming ideas of the time (eg. from Fortran and COBOL) and made them easier and more accessible by removing whatever was awkward or weird about them.

Python is the natural successor to BASIC. It's the "get shit done" language. Takes all the ideas that we'd expect from the times (90s, so OO, plus dynamism plus first-class functions etc.) and packages them up in an easily accessible form.