Talk:Interactive programming (repl): Difference between revisions

Line 68:
 
::I did not say that execution would require visual output. Where did you get that idea? The keyword here is ''execute'', whether it is some calculation or controlling a device or whatever. It seems that you do not understand the difference between '''executing''' code and '''editing''' a program. You seem to think that defining a function executes something. It does not. Defining a function means that you add the function code into the program. That is editing. Even if it is done with a line editor. And even if some pre-compilation is done. (The line editors of most Basic interpreters actually pre-compile each line that is inserted into the program.) --[[User:PauliKL|PauliKL]] 15:46, 15 April 2009 (UTC)
 
::: In a CLI as thought here, defining a function executes something: the definition of the function. Defining a function means the interpreter e.g. creates a new symbol-code bound. It's absolutely not editing the code; how the interpreter stores the definition, is not essential. Editing the code means using a text editor; the interpreter does not know nothing about you editing a file, until you run the interpreter over that file. Instead, the CLI '''is''' the interpreter itself (it is a way it can operate: instead of feeding it with a complete source, you interactively give commands to it, according to the same syntax you would use while writing the source in your preferred editor). Of course, to make a good experience to use the interpreter in such an interactive way, the CLI is also a line-editor... but once you hit enter, what you've written is interpreted, so even you can recall a previous input line, that line was already interpreted, and changing it will just make you able to re-run a changed copy of it. I.e. it is not luckly like a telnet session. (See readline library). --[[User:ShinTakezou|ShinTakezou]] 17:07, 15 April 2009 (UTC)