in reply to Re: Simple REPL madness.
in thread Simple REPL madness.

That would not run each line as it is typed. That would also let lexical scopes work, and make a number of other differences.

Replies are listed 'Best First'.
Re^3: Simple REPL madness.
by pobocks (Chaplain) on Dec 22, 2008 at 09:34 UTC

    Correct, although I feel it's worth pointing out that this code actually checks for a sentinel value (a bang on a line of its own) rather than evaluating each expression as entered.

    Also, I just realized, in order to be a proper REPL, it really should be print eval ...

    for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";