This is actually multiple parts:
I posted this in Off Topic so it does not dilude the other language section, as any thread about BASIC in any way shape or form tends to get pretty long pretty fast.

Why Are People Turned Off By the Name BASIC?:
I know the arguments, none of which have applied since 1985, at least.

Lets look at the arguments, and show some truth (argument in bold, correction after):

BASIC uses goto and gosub, so is unstructured: C allows goto. I have not used goto or gosub in a BASIC program since 1985. All BASIC's that have been common since them use structured procedures, just like C or Pascal, or whatever else.

Line numbers are not a good target: Again that applies to very old versions of BASIC, and does not apply to any BASIC that has been common since 1985. Any BASIC that still supports line numbers they are usually only used for program entry.

BASIC does not support integer data types directly: This is simply not true. I have never used a version of BASIC that does not support integer variables and data. Just postfix the identifier with a % to allocate it as an integer.

BASIC is not compiled: While many early BASIC versions did not come with a compiler, can you really say that the BASIC compilers for just about every variant of BASIC are not there, when they are?

BASIC does not follow a standard: While technically true, we do have two informal standards that one or the other is followed by most modern BASIC implementations. The two informal standards being BBC BASIC V and MS-BASIC as implemented in BASIC Compiler v2+, and QuickBASIC. These are both good structured BASIC implementations.

BASIC does not have indirection: That usually just is untrue. In any BASIC evolved from BBC BASIC V we have pointers in a very direct way, and in the QuickBASIC derived versions we have multiple methods of implementing indirection.

On points 3 and 4, the learning languages that many suggest today are even worse about distinguishing between data types, and are interpreted only in most cases. So that would make BASIC more of an option than what is often recommended.

Why Not Recommend BASIC For Beginners?
Modern Structured BASIC does not have the bad habit issues of the old 8-bit BASIC implementations. Modern BASIC encourages good practices, structured programming, typed variables, and modular programming. These are good reasons in themselves, though to add more:
BASIC is generally easier to learn than something like Scratch, especially when teaching young children to program. BASIC is more of a truly universal language, making for fairly simple implementation of almost anything that can be written in a language like C, Pascal, C++, etc.

Why not Use BASIC later?:
As BASIC is just as capable as other options, why do some many people frown on its use for bigger projects?

The point:
BASIC is a good usable language, that is discouraged. It is a good fit on the Raspberry Pi for many reasons, and indeed is a big part of one of the Operating Systems that runs on the RPi.

Though yet it seems as if the RPi Foundation discourages the use of BASIC, in preference to languages that have a higher barrier of entry to new programmers, and in some cases are more limited.

RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

This is one of the things that seems important enough to discuss in a reasonable manner, not like the old threads of language wars.

It came back to mind as I was doing some work on the parser for script based 3D CAD modeler I am working on for RISC OS. I am using a scripting language inspired by that of OpenSCAD, though syntax and structure that more closely follows ARM BASIC.

I feel it would be good to ask in a real way the question of 'why' on this issue.

RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

From my point of IT department work it was 3 partly historic (as I am) reasons that killed it for us:

Lack of data structures
Arrays of one simple variable type just do not cut it so file handling and internal data storage was a pain.
You used Cobol for complex data structures

Lack of object orientation and inheritance
Once seen as the be-all and end-all of programming, this was poorly supported and Pascal superseded it and then C came in.

Lack of functions
Line numbers where such a pain and took a long while to go. GOTO / GOSUB created real issues with parameter passing they added a nail in the coffin.

The fourth one (and I programmed a lot in FORTH and {miss it} not):
It was not the latest and greatest
Software houses had to be seen to be keeping up to date 'with the times' and that meant using new technology even if it was a full rewrite (look more revenue as we can sell the upgrade services) or opponent slagging (look, they are using last years technology - do YOU want to get stuck in the past Mr Customer)

Now it has so much ground to make up and is not really used on its own (.NET being a mix of languages) I can understand the foundation promoting a simple language (Scratch) that has very fast results for youngsters and then a more commercial language (Python / C / PHP / Perl / Java / Javascript etc) via Linux than BASIC.

I pointed out that almost all your points are not true, and have not been true since 1985. You are thinking of the old 8-Bit BASIC implementations.

It is true that OO is not implemented, though that is not needed for most beginners, and not used even by many with big projects. Remember OO is still an ongoing debate, with people on both sides of it having very good and valid arguments.

As I pointed out already:
BASIC does have parameterized block functions (called procedures when talking accross languages). BASIC does not use Line Numbers anymore, has not in a very long time.

BASIC does NOT use goto/gosub anymore, has not since 1985. Calling normal parameterized procedures is much more reasonable for most people, so that is how we do it in BASIC.

BASIC does have structured data support. You are again thinking about ancient BASIC.

RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

I suspect it's been overtaken by Python, which has a large user base, and it consistent over all platforms, which is less common with BASIC. Python is slighter better structured, and has more language features.

Nothing really wrong with modern BASICS, but more people use Python.

(Although I started with BASIC and 6502 assembler, I use C exclusively now, with occasional forays in to C++)

Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

I suspect it's been overtaken by Python, which has a large user base, and it consistent over all platforms, which is less common with BASIC. Python is slighter better structured, and has more language features.

Nothing really wrong with modern BASICS, but more people use Python.

(Although I started with BASIC and 6502 assembler, I use C exclusively now, with occasional forays in to C++)

I also began with BASIC and 6502 assembler (CBM BASIC 2.0). Now I use C, Pascal, BASIC (both BBC BASIC V/ARM BASIC and FreeBASIC), and ARM Assembly. I am not so exclusive on my language usage.

How does Python make a good option to modern BASIC? I thought that python is lacking one of the most important parts of structured programming, explicitly typed variables, which BASIC deos have. I understand that Python has the power of being pushed by many users, still not sure that makes it a good option.

I do understand why people shyed away from the crude forms of BASIC that were seen on the old 8-bit systems. Though I can not think of a single BASIC implementation I have seen that still has the bad of those since the mid 1980's (excepting the ones that attempt to recreate the old experience).

Thank you for the input. It is definitely good input.

RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Library support ? Without it BASIC is useless for working with all the hardware addons that need libraries to make them easily useable.
PeterO

Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

In what sense is it discouraged? RPF have chosen python, but I don't see them telling people not to use BASIC if they want to.

I think when people make the decision of what language to use, it's more practical than worrying about goto statement or line numbers. Nobody really cares about any of that, it's just a reason they might give when pressed to give a reason.

What's the job market like for BASIC vs Python? If Python already does what people need, what's the motivation for them to use something else? Why don't Google, MS, Mozilla or anybody else who has the most on the line use BASIC?

If BASIC has an image problem, I'd say lead by example. Release software written in BASIC that outperforms existing solutions and that people love using. Start a BASIC meetup in your area. See if there are any students wanting to introduce BASIC in their schools. If that's not happening, it seems like there's a problem with BASIC itself and that most people just don't enjoy using it as much as other languages.

Python didn't become so widely popular because it was forced on anybody. People just tend to instantly see its merits when using it for a few minutes.

BASIC is generally easier to learn than something like Scratch, especially when teaching young children to program.

I wonder just how much personal experience do you have of teaching youngsters Scratch ?

PeterO

Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

I do understand why people shied away from the crude forms of BASIC that were seen on the old 8-bit systems.

For me, when I did my CS degree (long ago), the favored languages were things like Pascal, Algol68, and Ada. Languages like B were frowned upon (because B is typeless) despite being a serious systems programming language. BASIC was only mentioned in jest.

Of course I know that BASIC has evolved and improved over years, but that old mindset from the formative years, still lingers....

I thought that python is lacking one of the most important parts of structured programming, explicitly typed variables...

"Structured Programming" as it was formulated in the 1950's / 60's does not say anything about data types or typed variables. neither were those things mentioned when I was taught the principles of Structured programming in the 1970's.

Rather Structured Programming is all about structuring ones flow of execution and specifying it. You know, sequence, selection, iteration, recursion. With some notion of functions and procedures.

Having dynamic typing like Python or Javascript removes a lot of syntactic noise from a language design. Which is of great advantage when starting out rank beginners.

Now, until BASIC can toggle a GPIO pin on a Raspberry Pi 3 at 50MHz or calculate the first million digit Finonacci number in 13 seconds on my PC I see no reason to look at it.

Last edited by Heater on Tue Nov 20, 2018 4:42 pm, edited 1 time in total.

(in the UK)
As an BBC Basic user at the start (and I liked it, it is easy to learn the basics, my son some years back picked it up quickly on a BBC emulator)

People don't use basic because it went out of fashion for teaching and in the recent up surge in computing again in UK schools then scratch at the start and python later on are now the recommend tools. Some use Visual Studio if they want as well and whichever basic/c/.. they wish to use there.
Because they are what people may use when they are in jobs.

It is still taught today but in the forms, for example Microsoft Small Basic used in the lower ages of senior in places until they *have* to move to something else.
It easy to pick up and is modern in is methods.

BASIC still doesn't seem to have a nice IDE to help you along, or has it ?

It need pythons push again and modern look to become the language again for teaching again.

Why Are People Turned Off By the Name BASIC?:
...
BASIC is a good usable language, that is discouraged.

I don't think it is so dramatic. There are just often better languages to chose from so there is no need to stick to Basics.
While you can make the list of Basic basic features very long I somehow don't find anything that is better than with other languages.
Yes it is usable language. So what? I grew up with C64 Basic (and Simons Basic) then moved to Amiga (and AMOS) Basic, did (too much) stuff in Visual Basic yet somehow I didn't find anything good in particular that would be worth of sticking with it. And I find the name of the language quite fitting. It tells exactly what is good about it. And once you start adding advanced features to it then it becomes something else and you lost the best feature.

I was once hired to prise a Dutch company off their use of BASIC. They had been using it a lot for their commercial systems, then won a contract for a large real-time project and were totally floundering trying to get BASIC to handle multiple interrupts from disparate sensors.
Alan.

PeterO wrote:
Library support ? Without it BASIC is useless for working with all the hardware addons that need libraries to make them easily useable.
PeterO

What BASIC are you using that does not have library support?

ShiftPlusOne wrote:
In what sense is it discouraged? RPF have chosen python, but I don't see them telling people not to use BASIC if they want to.

I think when people make the decision of what language to use, it's more practical than worrying about goto statement or line numbers. Nobody really cares about any of that, it's just a reason they might give when pressed to give a reason.

The lack of any provision for people to learn BASIC, and the strong push of other languages, I think make a huge statement against BASIC by RPi. My view.

What's the job market like for BASIC vs Python? If Python already does what people need, what's the motivation for them to use something else? Why don't Google, MS, Mozilla or anybody else who has the most on the line use BASIC?

They are not on with Python any more than BASIC. There are many other questions about those two companies that would discount that argument in my view. Though this is not about talking about companies.

Neither one has much of a job market (though both do have a small job market).

If BASIC has an image problem, I'd say lead by example. Release software written in BASIC that outperforms existing solutions and that people love using. Start a BASIC meetup in your area. See if there are any students wanting to introduce BASIC in their schools. If that's not happening, it seems like there's a problem with BASIC itself and that most people just don't enjoy using it as much as other languages.

Fair poitn overall, EXCEPT FOR:
Many students do get into modern structured BASIC, and do a lot with it, and really like it. Then they get into university, and there prof tells them something along the lines of "BASIC is evil, it will create bad habbits that can not be reversed" and they run from BASIC on the word of another, usually the prof was talking about the old limited BASIC that was the last he/she used. Often these students are seen to decrese in productivity after they leave BASIC.

AND: BASIC compilers do not get the same attention as C compilers, so optimization legs behind a bit. All because of the poor image of BASIC.

"Structured Programming" as it was formulated in the 1850's / 60's does not say anything about data types or typed variables. neither were those things mentioned when I was taught the principles of Structured programming in the 1970's.

Rather Structured Programming is all about structuring ones flow of execution and specifying it. You know, sequence, selection, iteration, recursion. With some notion of functions and procedures.

This is true. Though I am speaking of structured programming as taught in university.

Having dynamic typing like Python or Javascript removes a lot of syntactic noise from a language design. Which is of great advantage when starting out rank beginners.

Now, until BASIC can toggle a GPIO pin on a Raspberry Pi 3 at 50MHz or calculate the first million digit Finonacci number in 13 seconds on my PC I see no reason to look at it.

Toggling a GPIO on the RPi from BASIC at high speed has been done many times over. The limit is not usually the language, it is the Hardware.

The Finonacci number is something I do not even think you could do on a much more powerfull system with the best optimizing compiler in any programming language, that is unreasonable.

People don't use basic because it went out of fashion for teaching and in the recent up surge in computing again in UK schools then scratch at the start and python later on are now the recommend tools. Some use Visual Studio if they want as well and whichever basic/c/.. they wish to use there.
Because they are what people may use when they are in jobs.

As is BASIC (for some closed source stuff you will be surprised), not allowed to say anything more specific, though there are companies that prefer modern BASIC and make closed source products that are used by millions of customers.

Ok I can see C, as it is used quite heavily commercially. Though it seems that Python is more of a hobbiest language than proffesional.

I don't think it is so dramatic. There are just often better languages to chose from so there is no need to stick to Basics.
While you can make the list of Basic basic features very long I somehow don't find anything that is better than with other languages.

No language is really better than most in any way. That is part of the point.

FYI, the BASIC on the C64 was an example of the wrong way around it, and not a good example of even the BASIC versions of that time. I do not know AMOS, on Amiga I used originally AmigaBASIC, then a few compilers compatible with AmigaBASIC with some extensions.

Yes it is a language that originally targeted beginners, and is still good at that, my primary point.

Though for those that wish to continue to use it, it has grown up to a full rich structured language, that can be applied for major projects.

That does not say that people should stick with it, just that for beginners it should be more readilly available if they wish to try it, and not be put down by those that remember a BASIC that no longer exists.

I have attempted to make most of these same points in favor of the C programming language, though it seems that people do not see it as easy, even though it is easier than Python for those students here that are taking part in a program to see what language works best for a begginner language. The instructers are carefull of teaching method so that the teaching method does not stand in the way of the language, trying to see what language really does work best.

So far it seems that young students do best with BASIC, with C being a close second, Pascal after that, then Java, after that is Scratch, further down the list is Python. Knowing this information (as I helped push the project into exestence a few years ago) is part of the many reasons that I mention it. And why I attempted to word the opening of this thread to actually have a positive descussion.

RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

it seems as if the RPi Foundation discourages the use of BASIC, in preference to languages that have a higher barrier of entry to new programmers, and in some cases are more limited.

I do not believe the Foundation discourages Basic beyond choosing to recommend other than Basic. I see no discouragement of using Basic just as I do not see discouragement of using Go, Java, Javascript, Lua, Pascal, Perl, Ruby or any other language.

But in more general terms there is a pervasive discouragement of using Basic.

That's something which has always interested me as someone who has long been a fan of Basic; TurboBasic, PowerBasic, VB3 through VB6, VB.Net ( though not so much a fan there ), RealBasic (Xojo), FreeBasic, and even BBC Basic. It's been the language I have most used, and I have used it for most things from utilities to compilers. Sometimes just to prove that "it can't be done, nor as easily, with Basic" is utterly false, prejudice or simply ignorance.

There was at least one huge thread on the forum from before the Pi was ever released which covered the debate on the appropriateness, or not, of Basic, AFAICR -

I think there's one thing telling in all such discussion; "Basic" or "BASIC". I think that often reveals a significant detail of the perspectives people hold; "Basic" as a modern programming language or "BASIC" with all the baggage and limitations from what it originally was, complete with the the unfortunately lingering "Beginner's" label which people choose to drag out when they wish to criticise, demonise or ridicule it. "It's for kids, not serious competent professionals" has haunted Basic for years.

Most of the objection to Basic is merely ignorance, prejudice, by rote, or as a seized opportunity to hate upon something. It has found itself at the bottom of the pile. Basic and proponents of it considered 'fair game' by most. Usually for no good reason, and often those who do criticise have never actually used a modern Basic.

That reflects other pervasive social attitudes so good luck trying to convince those who have decided it's the worst possible language in the world that it isn't. No matter what one's preferred programming language; 'everyone agrees' it's better than Basic.

So, for all my love of Basic; why have I now moved to using Python ?

Not because it's a better language, simply because it's a language which, to me, is 'pretty much the same as Basic', and it is multi-platform, and, setting aside the Python 2 and Python 3 issues, has a universally standardised specification.

I would have kept with using Basic, would have preferred to, but the reality is that if one wants to write code once, use it anywhere, Basic isn't the right choice for that. Basics usually aren't even compatible with each other. Choose any variant and you're already walking yourself into a corner.

I wouldn't discourage people from using Basic because of what Basic is, but I would discourage people from using Basic because of the limitations choosing that imposes. I would recommend using a language like Python or Javascript ( maybe C though I personally detest using it myself ) which is far more widely supported across the platforms one may come to use.

Had there been some multi-platform Basic which had seen widespread adoption I would have likely gone with that. But there wasn't and isn't.

And why did I choose Python over anything else ?

Because I wanted to join in with the Pi journey and Python had been embraced by the Foundation and that seemed the best option for me of what was available at the time, looked to have the least steep learning curve, and the closest to Basic of the choices on offer. I guess it also helped that the white space indentation didn't faze me having already used programming languages which used the same.

The bottom line was that if I wanted to join in the fun, share with others, to educate or even show off, maximise my usefulness and returns, I would have to adopt something which could be shared and be useful to a wide audience. Basic does not fit that bill.

//*******************************************************************
//We are going to select the next task in queue, based on priority.
//The Round Robin algorithm is long gone, replaced by a binary place
// change algorithm that assures static priorities and 100% of tasks
// get there time.
//When counting in binary it is for certain that only one bit will
// transition from a 0 to a 1 value, and each higher bit takes
// twice as long between switching. This is a good priority
// scheduling method (val ^ (val+1) & val) gives the one bit that
// switched.
//*******************************************************************
long NextTask(void)
{
//We count until we swith a bit to one that corisponds with a queue
// having at least one runable task.
int SwTo, LpEnd, bit;
LpEnd = 0;
while (!LpEnd)
{
//Get just the bit that changes for next count.
SwTo = CurPri ^ ((CurPri + 1) & 0xFF) & (CurPri + 1);
//Determine the bit position (would be easier in asm).
for (bit = 7; !((1 << bit) & SwTo); bit--);
//Increase the priority count, for the next pass, and wrap around
// at 255 to keep it in 8 bits.
//A priority counter changing to zero does not have any bits that
// changed to 1, therefor skip the value 255 (as that would wrap to 0).
CurPri = (CurPri < 0xFE) ? (CurPri+1) & 0xFF : 0;
//If there is a runnable thread in that priority switch to it,
// this does not start the task running, it just sets the task
// to run next time we return to user mode.
if (TskRunCnt[bit])
{
TaskSwitch(TskQueue[CurTsk[bit]].next);
LpEnd = 1;
}
}
//Yes we actually return, so that the OS can do other usefull work,
// or just to give the now active task time to run.
return 0;
}

NOTE: this source also on my site.

And yet other languages are seen as a better option for beginners. It could actually be done this well in a modern BASIC, though that is only part of the point.

That seems to make a good case for how simple C is. People have already seen many examples of the same in BASIC and Assembly language (many posted by me).

So many feel that C is a poor option for beginners. The water on BASIC seems. to be an interesting mix. Yet the study project seems to be proving these to be the two easiest to teach modern languages to very young students with no prior experience with programming.

RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

@AndyRoo:
It apears that you did not read my initial post.
...
You are again thinking about ancient BASIC.

Actually I did - I pointed it my notes where ancient history as I was around when BASIC died and the reasons I added where why I saw BASIC fall out of use in both my own teams and suppliers

Computing is driven by the 'next best thing' even now.

I would also add:

It became associated with home computers
With the rise of the Sinclair and Amstrad machines in the UK, BASIC was quickly associated with home machines where you typed in code from magazines or loaded from tape. I remember folk using the Commodore PET series questioning the BASIC inbuilt as not being suitable for large programs and one supplier (still on the go as a company) moving to COBOL to combat against CP/M systems written in the 'mainframe' language of the day

Don't get me wrong - I've used at least 10 high level languages and a fair number of low level ones (inc hand assembly and hex code entry) and BASIC was around my 3rd or 4th - the new compilers are great but the marketplace does not see that. If I want to earn a living as a coder I would not choose BASIC.

That's something which has always interested me as someone who has long been a fan of Basic; TurboBasic, PowerBasic, VB3 through VB6, VB.Net ( though not so much a fan there ), RealBasic (Xojo), FreeBasic, and even BBC Basic.

DavidS mentioned several more types of Basic. Just how many are there?

There are two Python's which is a huge problem IMO.

There is only one C. Sure its evolved over the years C89, C99, etc as the ISO standards are revised and the language evolves. But it is only one language.

One thing I love about this thread is comparisons of 'benchmark' tests of one language vs another

Having written a cross compiler and worked on a couple of others, the user language makes little difference if the interpreter or compiler kicks out waffly or poor machine code. I've first saw COBOL run both like a snail and a greyhound on a 6502 machine and it was all down to the assembler routines that came out of the compile stage. For most businesses a few seconds here and there make very little difference. I would rather have a sensible error trap rather than some obscure text that saves me milliseconds - and BASIC was always good for that.

My challenge then is: Show code that computes fibo(4784969) in the BASIC of your choice and report it's run time.

I have attempted to make most of these same points in favor of the C programming language, though it seems that people do not see it as easy, even though it is easier than Python for those students here that are taking part in a program to see what language works best for a begginner language. The instructers are carefull of teaching method so that the teaching method does not stand in the way of the language, trying to see what language really does work best.

That is interesting. Where is here? I'd like to read their methods and results.