Is Lisp the only language with REPL?

前端 未结 7 1863
失恋的感觉
失恋的感觉 2020-12-13 06:59

There are languages other than Lisp (ruby, scala) that say they use REPL (Read, Eval, Print, Loop), but it is unclear whether what is meant by REPL is the same as in Lisp. H

相关标签:
7条回答
  • 2020-12-13 07:56

    There are a number of people that consider a REPL to needs to behave exactly like it does in LISP, or it's not a true REPL. Rather, they consider it something different, like a CLI (command line interpreter). Honestly, I tend to think that if it follows the basic flow of:

    • read input from the user
    • evaluate that input
    • print the output
    • loop back to the read

    then it's a REPL. As noted, there are a lot of languages that have the above capability.

    See this reddit thread for an example of such a discussion.

    0 讨论(0)
提交回复
热议问题