什么是“REPL"?在 JavaScript 中? [英] What is a "REPL" in javascript?
问题描述
我看到了创建REPL"的参考.什么是 REPL?
I saw a reference to creating a "REPL". What is a REPL?
var arDrone = require('ar-drone');
var client = arDrone.createClient();
client.createRepl();
推荐答案
repl 标签就在 Stack Overflow 上:
Good information in the repl tag right here on Stack Overflow:
关于 read-eval-print-loop
About read-eval-print-loop
读取-评估-打印循环 (REPL) 是一种编程语言的交互式解释器.它起源于 LISP 系统,但许多其他语言(Python、Ruby、Haskell、Tcl 等)使用 REPL 来管理交互式会话.它们允许通过绕过代码"的编译阶段对语言进行简单的实验.编译 ->执行"循环.
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.
REPL 有 4 个组件(以 LISP 表示法命名):
There are 4 components to a REPL (named in LISP notation):
- 读取函数,从键盘读取输入
- 一个 eval 函数,用于计算传递给它的代码
- 打印功能,用于格式化和显示结果
- 循环函数,运行前三个命令直到终止
这篇关于什么是“REPL"?在 JavaScript 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!