Live data from Hacker News

30 years later, QBasic is still the best

nicolasbize.com

31–40 of 133 posts

Re: 30 years later, QBasic is still the best

#31

Earlier quoted context omitted.

It has to though. X = Y; // what should change?

In a declarative language, nothing.

But computation has an intrinsic directionality. If you have two expressions a, and b, and you want to unify them in a declarative language as a = b, then having an unknown subterm in one or the other can make the computation have a completely different complexity, making one direction easy and the other intractable. The P vs. NP problem is a famous question exactly about this directionality.

Here's a simple example (in a declarative language that allows non-terminating computation; in a total language similar examples can be given, except "impossible" means intractable rather than non-computable, which, for all intents and purposes is the same):

    X = terminates?(P(1))
If X is known then finding a P is easy; if vice-versa, finding X is possibly impossible.

Re: 30 years later, QBasic is still the best

#32

Earlier quoted context omitted.

Honestly it's pretty strange that assignment has a directionality.

It has to though. X = Y; // what should change?

Oh, I meant in the special case of something that can only be an r-value on the left such, such as a constant or function result. But yeah, it could still confuse newbies, because the problem is not understand that it's procedural.

Re: 30 years later, QBasic is still the best

#35
I learned programming via BASIC (not QBASIC, on a Modular One https://www.wikiwand.com/en/Computer_Technology_Limited)and I agree it is a great way to learn how to write code (look at all those little kids who used to dodge into WHSmiths in the UK and write small, rude programs!)

But the thing that always pissed me off was that it did not support proper functions (one-liners, yes) to the extent that I wrote a preprocessor in BASIC that did support them (rather badly).

One thing I have always stressed to the many people I have taught is "Write functions, write lots of functions, you cannot write too many functions!"

Re: 30 years later, QBasic is still the best

#36
post #27
post #23

Not to be contrarian, but Python is even simpler than Basic. You don't have GOTO, but you don't need it. Just using a subset of Python language you can do anything you need, and with less syntactic noise.

How do you draw a line on the screen in Python? Here's BASIC. I'm not saying this is good. But it is easy. SCREEN 13 LINE (X1, Y1) - (X2, Y2), COLOUR

> How do you draw a line on the screen in Python?

Using only stdlib:

  import turtle
  turtle.penup()
  turtle.pencolor(colour)
  turtle.setpos(x1,y1)
  turtle.pendown()
  turtle.goto(x2,y2)

Re: 30 years later, QBasic is still the best

#38
post #23

Not to be contrarian, but Python is even simpler than Basic. You don't have GOTO, but you don't need it. Just using a subset of Python language you can do anything you need, and with less syntactic noise.

It obviously depends on the Basic version but I think it's hard to argue that Python is simpler than Basic in general (e.g. OO, FP are quite complex topics for newbies) plus all the libraries - it's a lot for a beginner to take in.

I do think that there is an interesting point around whether you could usefully define a subset of (say) Python as a better first language. I've not seen anyone do that but seems like might be worth trying.

Re: 30 years later, QBasic is still the best

#40
post #12

I will never forget the day that I spent debugging an early QBasic program that included a line similar to 5 = x for an assignment in the first draft. There were tears and deep frustration at the moment I discovered that assignment had a directionality. The author's story brings back so many memories of learning and growth. For those too young to know -- magazines used to come with page-long Basic programs for games…

The first time I saw X = X + 1 in a ZX Spectrum basic program listing, I thought it would cause the computer to catch fire. I was 9 though.

Zx Spectrum was actually less confusing because it required LET before variable assignment.
Post reply on HN