javascript - javascript 中的 "REPL"是什么?

标签 javascript node.js read-eval-print-loop

我看到了有关创建“REPL”的引用。什么是 REPL?

var arDrone = require('ar-drone');
var client  = arDrone.createClient();
client.createRepl();

最佳答案

中的好信息在 Stack Overflow 上标记这里:

About read-eval-print-loop

A Read-Eval-Print Loop (REPL) is an interactive interpreter to a programming language. It originated with LISP systems, but many other languages (Python, Ruby, Haskell, Tcl, etc.) use REPL's to manage interactive sessions. They allow for simple experimentation with a language by bypassing the compile stage of the "code -> compile -> execute" cycle.

There are 4 components to a REPL (named in LISP notation):

  • A read function, which reads input from the keyboard
  • An eval function, which evaluates code passed to it
  • A print function, which formats and displays results
  • A loop function, which runs the three previous commands until termination

关于javascript - javascript 中的 "REPL"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13603021/

相关文章:

javascript - Sails.js Socket.IO 使用时间范围窗口获取数据 (setInterval)

javascript - 使用 Node JS 递归获取 DynamoDB 查询中的所有项目

Haskell 需要帮助理解流

javascript - 隐藏在按钮和表格下方的工具提示说明

javascript - Raphaeljs 和 Internet Explorer,单击元素时出现问题

javascript - 由一组正方形组成的剪辑路径

javascript - Chrome 陷入无限循环,无法复制/粘贴以保存我的 jsfiddle

javascript - 在 NetBeans/Eclipse 中运行 JavaScript 文件?

xcode - REPL 中的 `Error creating target Swift AST context: (null)`

php - php 是否存在 `pry` 等价物?