by Dilpil · 15y ago · 0 comments
Second, the language syntax and semantics just don't lend themselves very well to a REPL. For example, there is no top-level execution context in C++. Should we pretend like the lines entered into the interpreter are part of main()? That would mean we couldn't do useful things like define functions. And should typing `int foo = 3` lock up the identifier "foo" for use as an int forever, like it would in normal C++, so that we couldn't later write `float foo` or `string foo` without restarting the interpreter ?