3 ms·
This is a great idea. I grew up with AppleBASIC, which had line numbers, but after decades coding with many other languages, there’s no reason to use line numbe
by TedDoesntTalk 4y ago
This is a great idea. I grew up with AppleBASIC, which had line numbers, but after decades coding with many other languages, there’s no reason to use line numbers. And if the purpose of this repl is to teach, then teaching line number programming in 2022 is pointless.
Unfortunately it then requires an editor, otherwise how do you overwrite/change a line?
- dragonwriter 4y agoTo me the main use of line numbers is that they allow you to have a seemless combination of an immediate environment and a line-oriented program editor. With modern UI, there's pretty much no reason to do that, of course; with a retro style UI, there might be some marginal use. (Also, supporting line numbers and line-oriented GOTO/GOSUB means you can directly use any of the libraries or classic code in that style; unwinding GOSUB/RETURN into named subs is trivial enough if it is otherwise clean, but unwinding GOTO-heavy code without having a working starting point isn't pleasant.)
- 7thaccount 4y agoIsn't saying "GOTO 40", where 40 is the line number a big deal with old-school BASIC? Something along those lines anyway?