For some reason it took me years to understand the need for a line editor. It didn't make any sense in my head. Then one day I saw the famous picture of Bill and Allen as kids in front of a teletype [1] and it finally clicked.
The way it worked was like this: As you keyed in your program, letter by letter, it was printed out on the paper immediately like a typewriter. If you ran the program and there was a problem, you'd just read (or re-read) the printout, find the line with the bug, then use a line editor to fix just that line. You might mark the paper with pencil to keep track of the change. After a while if you needed to see the latest version, you'd just print the whole program out, or just the lines you needed.
This realization finally clued me into what was going on when I was 10yo and programming BASIC on a TRS-80 Color Computer. It was essentially simulating a teletype (which makes sense given BASIC's inception at Dartmouth [2]), where you would type each line individually, then if there was a problem, you would edit the program individual lines at a time. I always thought it was an odd until I understood how actually using a teletype actually worked. Also explains why the command to write letters to the screen is called "PRINT".
Yeah, a lot of people would send their work to the line printer at the end of the day, and then start fresh the next day with a pencil to sketch out what they were going to change. Then using ed is a no-brainer.
I heard that a lot of people preferred fewer files and longer functions for the same reason--it was all there on the fanfold output and could be read at once, rather than working in 80x25 chunks. After that mode of working was replaced by interactive programming at the display terminal, we started to prefer functions that didn't span more than 1-2 screens.
Many BASIC interpreters worked exactly like that. On a TRS-80, for instance, you would type your program and, when you needed to edit a line, you’d use the “edit” command with a line number as the argument and drop into a line editor.
The way it worked was like this: As you keyed in your program, letter by letter, it was printed out on the paper immediately like a typewriter. If you ran the program and there was a problem, you'd just read (or re-read) the printout, find the line with the bug, then use a line editor to fix just that line. You might mark the paper with pencil to keep track of the change. After a while if you needed to see the latest version, you'd just print the whole program out, or just the lines you needed.
This realization finally clued me into what was going on when I was 10yo and programming BASIC on a TRS-80 Color Computer. It was essentially simulating a teletype (which makes sense given BASIC's inception at Dartmouth [2]), where you would type each line individually, then if there was a problem, you would edit the program individual lines at a time. I always thought it was an odd until I understood how actually using a teletype actually worked. Also explains why the command to write letters to the screen is called "PRINT".
1. https://www.gatesnotes.com/About-Bill-Gates/Early-Days-as-a-...
2. https://youtu.be/WYPNjSoDrqw