Relatedly, here's TLS 1.3 in VB6: https://news.ycombinator.com/item?id=35882985
If one is "just" translating something that is idiomatic to a language to something that is not in another, it might take 100x for lines for codes in a way that is terribly hard to understand.
I can't magically speak German because I know a load of abstract language theory.
And this can work the opposite way. If I know small talk, and then read that C++ can do OO code, I could then think about writing X in C++ and OO being the best model. But I then hit problems when the limitations of OO in C++ become apparent.
In my experience, programming in a language is finding what works in that language, not trying to make the language fit what is in your head.
Don't get me wrong, if he enjoys writing code in BASIC, I'm not going to tell him to stop having fun. It would be silly to tell some random stranger "You're having fun wrong!" (Even if I totally think he's having fun wrong. Grin). If he's having fun with it, go for it.
But man, I looked at the code and got flashbacks. The bad kind. BASIC was the first language I learned when I was a kid, and it's what taught me programming (because after typing "LOAD WIZARD.BAS", I could type "LIST" instead of typing "RUN" and I could actually see what the program was doing. So I learned by reading other people's code. And The Wizard's Castle was pretty good for a BASIC program: it had subroutines, a multi-dimensional map stored in a single-dimensional array (and an actual function defined to convert X,Y,Z coordinates to an index in the array!), and so on. So I am grateful to BASIC for teaching me programming.
And I never, never, NEVER want to write another line of BASIC code again in my life.
But if he enjoys doing so, good for him. I'll just sit here muttering under my breath "But he's still having fun wrong"... :-)
By the standard of getting kids started it’s an amazing and wildly successful language.
By any other standard, it is absolutely terrible! It commits every famous programming sin! Stay away! Do not learn from this language! LOL
10 PRINT "THIS IS FINE"
20 GOTO 10Never used them, and yet I can unquestioningly agree. The way you had to number each line in increments of 10 so that you could insert a line 15 later in between lines 10 and 20 was, looking back at it, insane.
I can understand why they did it. In the era of no full-screen text editors, where you just typed each line one at a time into a REPL (not that I knew the term REPL at the time), and it stored the lines in the order of their lines numbers... well, that was the only way to edit your code. Made a mistake on line 20? Type a brand-new line 20 and it will replace the old line 20. Want to insert a line between lines 10 and 20? Type in line 15 and it will go and insert. So you could actually load your program, edit your code at the REPL, and save it.
But man, using an actual visual editor is so, so, SO much better than that system. I'm glad it's on the dust heap of programming history where it belongs. It was a decent option for the time when computers had 4K of RAM, but once it was actually possible to edit code in a full-screen editor, line numbers were no longer useful.
Look at how acceptable C has changed over the years.
In ye old days it was acceptable to just read in any old text without checking bounds, now that is considered harmful.
There are still use cases for hairier parts of C, but that doesn't mean they should be used all the time. Same with goto.
speaking of which, I was pleased to see FORTH in there. not that I've ever used it but I was introduced to it in the early 90s and it's cool to see that it's still useful
really enjoying your site content
On another non-compatible but really small Basic, check NMH BASIC 3:
https://www.t3x.org/nmhbasic/index.html
Compile it under Unix (or windows with w64devkit):
cc -o tcvm tcvm.c
Run primes.bas: tcvm basic primes.bas
NMH BASIC III - 7599 BYTES FREE
#3 = primes.bas
OK
load #3
Also, as it's T3X0 code, you might be able to port and run under DOS
and CP/M. Yes, you read it right. By default I didn't compile it to Unix
native 32/64 bit with T3X/0 because it NMH Basic requires a 16 bit machine/interpreter. But if it's cross-compiled to a 16 bit DOS or CP/M, it
will run native.Show up what you can do. Port scoundrel, for instance:
https://codeberg.org/luxferre/scoundrel-ports
I already doing that to JimTCL and it's a piece of cake.
?Illegal function call
OkI'll see if I can port this "Vi" to this flavor of BASIC.