什么是 REPL 进程,我可以用它做什么? [英] What's a REPL process and what can I use it for?

查看:75
本文介绍了什么是 REPL 进程,我可以用它做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
REPL、解释器和编译器之间的关系

我一直在使用 node.js 在 heroku.com 上进行试验,我听说有一个REPL 过程"可以用于在我的应用程序环境中进行试验.

I've been experimenting on heroku.com with node.js and I've heard of a "REPL process" I could use for experimenting in my app’s environment.

有人能给我概述一下它是什么,以及它可能如何应用吗?

Could someone give me an overview of what it is, and how it might be applied?

推荐答案

REPL - 根据 维基百科条目

这是一个读取评估打印循环.

It's a Read Eval Print Loop.

这对您来说意味着:它就像您的应用程序的控制台.您键入的每一行都会添加到现有程序中.但它比单纯的控制台"要复杂一些,而且你可以做一些奇特的附加事情.

What that means for you is: It's like a console for your app. Every line you type is added to the existing program. But it's a bit more complicated than a "mere console" and it has some fancy additional things you can do.

就您的问题而言,REPL 是节点,如果您在没有任何应用程序代码的情况下调用节点(例如在您自己的机器上 - 它不是一个非常大的程序),您将获得 REPL.

In the case of your question, it's the node that's the REPL, and if you invoke node (like on your own machine - it's not a very large program) without any app code, you get the REPL.

这篇关于什么是 REPL 进程,我可以用它做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆