Talk:Interactive programming (repl): Difference between revisions

Line 60:
 
:But the commands are being interpreted immediately? If I type 1+1 into the Python shell it returns 2. If I type <code>def inc(n): return n+1</code> if creates the definition of a function, as soon as I hit return, I.e. immediately. The definition of a function doesn't print anything special but it is a valid action of the CLI. If you are running bash on linux, you can define functions at the command line, without storing them in a file and call them later. There ''is'' a difference between this and running commands from a file. --[[User:Paddy3118|Paddy3118]] 11:23, 13 April 2009 (UTC)
::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)
Anonymous user