Talk:Interactive programming (repl): Difference between revisions

Line 62:
::We are not talking about difference between running a program from memory and running a program from a file. We are talking about the difference between executing commands and creating (editing) a program.
::If you open a text editor and type a piece of C code, the code is entered into the program immediately. Of course, since C is usually implemented as compiler, you would need to compile the program before running it. But it may not even be necessary to store the program from memory into a file to compile it. If I remember correctly, in the IDE of Turbo C, you could just type in the code and then run it, it was automatically compiled from memory into memory and then executed. The only visible difference to your definition of CLI is that Turbo C used full screen editor instead of line editor. --[[User:PauliKL|PauliKL]] 12:27, 13 April 2009 (UTC)
 
:I would just go back and quote something you said in your fist paragraph of this section:
::"Command line interpreters do not create functions, they interpret and execute commands"
:In Python, a language with a CLI, when in its CLI, the creation of a function is a command that is immediately executed. The action of the interpretation of the text typed in that happens to represent a function definition is to create a function 'internally'. You seem to think that a CLI's task is restricted to executing expressions with an immediate visual output, or are you merely pointing out that the notion of a CLI is not as clear cut in Basic and forth as you use the same included editor as a CLI but in different ways when not needing longer-term storage of a program? if the latter then in Basic, if you have to add line numbers at the command line to store any function to memory then I would just go ahead and show typing in of the line numbers in the function definition, and presumably leaving off the line numbers when you want the immediate effect of calling the function with arguments so that it prints a result. You could do something similar for Forth I guess. --[[User:Paddy3118|Paddy3118]] 14:03, 13 April 2009 (UTC)
Anonymous user