4 ms·
That's crazy! I hate to be critical about something so well intentioned, but I've taught young children to program and they do perfectly well without line numbe
by russellbeattie 7y ago
That's crazy! I hate to be critical about something so well intentioned, but I've taught young children to program and they do perfectly well without line numbers! What is PG thinking? Nostalgia is great and all that, but this is just teaching bad habits in an extinct form of programing.
(That said, teaching kids using Scratch, which doesn't give them any real idea at all of how important syntax and spelling is, nor how computers normally make loops and subroutines, isn't all that great either.)
- amasad 7y agoWe 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 7y 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 7y 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.