3 ms·
We just started from Basic because a) it's a good starting off point and b) it's good to be compatible with something so many people are familiar with. However,
by amasad 6y ago
We just started from Basic because a) it's a good starting off point and b) it's good to be compatible with something so many people are familiar with. However, now are evolving the language towards something more modern. To that end, line numbers are optional :-)
Here is the same program with no line numbers: https://repl.it/@paulgraham/repeat-nolines https://repl.it/@paulgraham/repeat-nolines
- pvg 6y agoSince this is the grousing thread, the thing that jumped out at me was the JS array in place of a BASIC-like array - 'array' is maybe a better name than 'DIM' but the declaration of a multidimensional array seems less clear and the semantics of the JS array are different enough that it would be confusing to someone, say, typing in old BASIC code they dug up on the internets.
- ashleyn 6y agoIf anything, I would suggest looking to Microsoft Quickbasic for a model of how this can be potentially refined. Quickbasic itself was a refined version of 1980s Basics, it removed line numbers in favor of optional line labels and featured structured programming constructs like the SUB/FUNCTION statements. The IDE was an early rich development environment akin to Eclipse or Netbeans, which would do realtime syntax checking and allow the user to navigate code semi-visually (by listing functions in a dialog). All the while, Quickbasic had a "standard library" of sorts that made drawing graphics and playing (PC speaker) sounds relatively accessible for the beginner programmer. It still had its rough edges (string manipulation was godawful), so a straight port of Quickbasic idioms probably isn't in order, but as far as refining Basic to be a bridge between beginner and advanced, I still feel like it never quite had a proper successor.