4 ms·
To paraphrase myself¹: C64 Basic does not have functions. This makes Basic programs tend to spaghetti and unreadable code, especially considering the constant
by teddyh 6y ago
To paraphrase myself¹:
C64 Basic does not have functions. This makes Basic programs tend to spaghetti and unreadable code, especially considering the constant memory constraints of those platforms. I grew up on these systems, and every time I think back on it I wish something like Forth would have taken its place - i.e. something with a clean and scalable pattern for abstraction. Basic, on the other hand, doesn't do abstractions. It barely has data types and what it calls “functions” are an even more limited form of Python's style of lambdas; every subset of code which can actually do something looks like “GOSUB 11600” when you call it. No naming, no abstractions, nothing.
(This is in some ways even worse than assembler, which usually has labeled goto’s.)
Reportedly, BBC Basic on the BBC Micro has proper named functions! I believe that basing this project on that Basic would have been vastly more productive and taught people the usefulness of abstracting things as you go, building ever higher abstractions, etc. But I suspect that the C64 (and its recognizable blue color scheme, which the whole page uses) brings more nostalgia-fueled clicks and shares.
1. https://news.ycombinator.com/item?id=19245814 https://news.ycombinator.com/item?id=19245814
- ido 6y agoQuickBasic on DOS was quite a comfy procedural language (including functions). It was Microsoft's successor to their old MS BASIC, variations of which were used by most 8 bitters (at least US-made ones).
- qsort 6y agoExactly. Basic in 80s micros was effectively the operating system, a more apt comparison in terms of today's technology would be sh/bash: its main purpose is to be a quick interface, and while you certainly can program in it, but I doubt it has more educational value compared to something more structured. I also don't agree with the notion that a more immediate programming environment will cause more people to understand programming/computer science. The notion that there exist machines that you have the power and responsibility to arbitrarily program yourself is the biggest hurdle. I, like many on this board, regard the previous as a profound natural truth. Most people just don't care, it's unrealistic and even a bit paternalistic to assume they will change their preferences if we give them different tools.