How do Ruby and Python implement their interactive consoles?
- by sxa
When implementing the interpreter for my programming language I first thought of a simple console window which allows the user to enter some code which is then executed as a standalone program as a shell.
But there are severe problems: If every line of code the user enters is handled as a standalone program, it has to go through the tokenizer and…