Hacker News new | ask | show | jobs
by DebtDeflation 911 days ago
>impossible to teach good programming to students that have had a prior exposure to BASIC

As someone whose first exposure to computer programming was BASIC on an Apple II in the early 1980s when I was around 8-9 years old and who later went on to learn multiple other programming languages, I always wondered what about BASIC inspired that particular sentiment. Was it the line numbers? The GOTO statement? The use of "GOSUB.....RETURN" rather than explicit functions?

2 comments

I tried to answer it in the article that someone recently posted to HN as well - https://news.ycombinator.com/item?id=38743062

spoilers: There was no GOSUB in the version Dijkstra commented on. There was not even anything else to put in an "THEN" statement than a line number ("THEN 210" is the code). If you wanted to store user's name in your variable, "n" was the name to go with, because "name" was not supported. And so on... :)

Oh, and the line numbers were a necessity.

Interesting, I wasn't aware how much the language had evolved from the mid 1970s through the early 1980s.

However, this line in your article would seem to indicate that GOSUB was available in the original version:

>The first version of the language was extremely limited, compared to any later popular version of BASIC. The only supported keywords apart from math functions were: LET, PRINT, END, FOR...NEXT, GOTO, GOSUB...RETURN, IF...THEN, DEF, READ, DATA, DIM, and REM.

It was probably the lack of structure like blocks and scopes. Everything is flat and global and GOTO means control can enter and exit at any point.