2 ms·
I strongly agree, but there is an even simpler way in which numbering lines is useful and valuable: Line numbers, for beginners, eliminate the advanced OS conc
by lproven 3y ago
I strongly agree, but there is an even simpler way in which numbering lines is useful and valuable:
Line numbers, for beginners, eliminate the advanced OS concepts of "files" and with them "editors" and "saving" and "loading" and much else.
If you type the code without a number, that means: do this now.
If you type code with a number in front, it means: remember this for later.
And that is all you need to enter, edit and run code.
No "editor" that loads "files" from a "directory" on a "drive" which you must "save" before you "execute" the code in a language.
To try it: type the code; hit Return.
To run the code you entered earlier: type RUN, hit Return.
This is a very powerful abstraction which simplifies a lot for beginners.
That you can further expose this by using those numbers in the code is a great first step into thinking about program structure as more than a consecutive list of steps. It leads naturally into loops and things.