I genuinely feel that Dijkstra’s famous rant about BASIC had a big hand in killing it off. I don’t think it was the intention but it created so much bias against BASIC. If you created something in basic, or even suggested using it, someone would post that quote in the usenet thread. Like Godwin’s Law.
It’s a shame, because it was so accessible, not just because it was right there but also because it does make it very easy for beginners to understand programming in a way that structured programming doesn’t.
If there’s one language guilty of causing brain damage it’s surely JavaScript.
Why JS and not PHP?
But things may still change for the worse with that process of Scala-ification they are doing to PHP 8.x.
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?
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.
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.
Basic evolved to have blocks, scopes, procedures, and functions. Visual Basic is probably closer to Algol or Pascal than to the original GOTO-only BASIC which Dijkstra was complainig about. VB.Net has the same semantics as C# which means it is one of the most powerful languages available. But it is not really a good beginner language anymore.
>If there’s one language guilty of causing brain damage it’s surely JavaScript.
I'm not sure about that. The only language that I felt led to bad things from developers was perl, mainly because it was so difficult to read later.
But it wasn't, it was just so easy to write badly early.
Seems doubtful? In the essay where his famous comment on BASIC appeared ("How Do We Tell Truths That Might Hurt?" https://www.cs.utexas.edu/users/EWD/ewd04xx/EWD498.PDF), Dijkstra took a snarky swipe at many of the major languages of the time: PL/I, COBOL, FORTRAN, APL and COBOL and FORTRAN at least are still around. It was just what in modern parlance would be called a shitpost (no, really, read it), albeit more articulate than most.
(I joke that Real Programmers™ get their shitposts immortalized in ACM publications: https://dl.acm.org/doi/10.1145/947923.947924 )
It also never killed it off, and it wasn't a big rant - just a single sentence - either. He also ranted over a few other languages in the same list.
PHP, like JS, sees a lot of unstructured code relying on random global variables in the wild as well :)
In its detractors, you mean? (This was a perfectly reasonable comment until you got irrational at the end; even people who understand Dijkstra's comment but feel that we lost something should be extremely pleased that the thing that took BASIC's place is a language that supports structured programming and is otherwise as nice as JS.)
[1] https://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/E... - 18th June 1975
Hahaha. I largely consider JavaScript to be the new BASIC - not because you can learn how to do some fun or useful things with it in an afternoon, but because it is ubiquitous. Web browsers are everywhere, and nearly all of them have JavaScript. A lot of JavaScript's quirkiness and inconvenience seems to derive from its web browser/DOM environment. (It's probably still easier to write GUI apps in Visual BASIC.)
Also: I'm still disappointed that Python 3 removed the print statement, so that
print "hello, world!"
is no longer a program that works both in BASIC and in Python.JavaScript is way more powerful than Basic on any of those 4 platforms. The canvas 2D API is way more capable and easy than what came with those systems. Even getting something like
<input type="text">
Was 50-150 lines of code in BASIC, by which I mean a text input line with a cursor and editing and not just BASIC's "INPUT" command which provided nearly zero editing support.Libraries like pixi.js or three.js or p5.js etc make it trivial to get fancy graphics on the screen. Making something you can share it with your friends or the entire world with a link, even if they don't own the same type of machine running the same OS. Host them on codepen, jsfiddle, github pages, all free.
I loved my experience with Basic and those old machines but I wouldn't force my kids to learn that way.
VS Today wheer there are 1000s of websites that will teach you JavaScript and 1000s of free video classes and hundreds of thousands of free examples. JavaScript is several orders of magnitude more discovable than basic ever was
If a browser had to be implemented in 16 KB of binary, and use at most 48kB of RAM when running, many of the APIs you enjoy having would not be there. And it's not even about features of the language itself.
There was a time when you could have both - the language and the functionalities of a browser - IE supported VBScript in script tags:
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Button1_OnClick
MsgBox "Hello world"
End Sub
-->
</SCRIPT>JavaScript is ubiquitous (which is why I consider it to be BASIC's de facto heir), but it's (much) less accessible than BASIC was.
And as good BBSes, user groups, and print magazines may have been for sharing C64 programs, the internet is pretty great for sharing JavaScript programs with people all over the world.
It's not the same, it's better.