Hacker News new | ask | show | jobs
by Dilpil 5542 days ago
So given all the negative reviews of this so far- why isnt there a good C++ repl? Surely there is a huge demand.
1 comments

First of all, C++ is one of the hardest languages to implement — Clang only got to the point where it could compile Boost less than a year ago. The complexity and difficulty of the task severely culls the number of independent parties willing to work on it.

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 ?