REPL流程在开发中的应用
Applications of REPL process in development
现在正在阅读Heroku的文档,对如何在开发中使用REPL进程有疑问。我遇到障碍的陈述就是这个。
https://devcenter.heroku.com/articles/getting-started-with-java#start-a-one-off-dyno
" 它还可用于启动附加到本地终端的 REPL 进程,以便在您的应用程序环境中进行试验,或者启动您随应用程序部署的代码"
我知道我们对 REPL 进程如何在 Whosebug 中应用它有几乎相同的问题,即 What's a REPL process and what can I use it for?。
但是,我无法理解答案,因为问题的语言是 Node.js ,不幸的是我不熟悉。那么,您能否将答案翻译成使用其他词的答案?我知道Java。所以,我希望你会使用与 Java.
相关的术语
谢谢。
Java 还没有发布 REPL,在 Java 9+ 中它将是 JShell。 REPL 是 Read、Evaluate、Print、Loop 的缩写,是解释型语言的标志(Java 已编译)。但是,REPL 非常有用,他们正在添加一个。
efrisch@eeyore ~ $ jshell
| Welcome to JShell -- Version 9-ea
| For an introduction type: /help intro
jshell> /help intro
|
| intro
|
| The jshell tool allows you to execute Java code, getting immediate results.
| You can enter a Java definition (variable, method, class, etc), like: int x = 8
| or a Java expression, like: x + x
| or a Java statement or import.
| These little chunks of Java code are called 'snippets'.
|
| There are also jshell commands that allow you to understand and
| control what you are doing, like: /list
|
| For a list of commands: /help
jshell> for (int i = 0; i < 4; i++) {
...> System.out.println(i);
...> }
0
1
2
3
现在正在阅读Heroku的文档,对如何在开发中使用REPL进程有疑问。我遇到障碍的陈述就是这个。
https://devcenter.heroku.com/articles/getting-started-with-java#start-a-one-off-dyno
" 它还可用于启动附加到本地终端的 REPL 进程,以便在您的应用程序环境中进行试验,或者启动您随应用程序部署的代码"
我知道我们对 REPL 进程如何在 Whosebug 中应用它有几乎相同的问题,即 What's a REPL process and what can I use it for?。 但是,我无法理解答案,因为问题的语言是 Node.js ,不幸的是我不熟悉。那么,您能否将答案翻译成使用其他词的答案?我知道Java。所以,我希望你会使用与 Java.
相关的术语谢谢。
Java 还没有发布 REPL,在 Java 9+ 中它将是 JShell。 REPL 是 Read、Evaluate、Print、Loop 的缩写,是解释型语言的标志(Java 已编译)。但是,REPL 非常有用,他们正在添加一个。
efrisch@eeyore ~ $ jshell
| Welcome to JShell -- Version 9-ea
| For an introduction type: /help intro
jshell> /help intro
|
| intro
|
| The jshell tool allows you to execute Java code, getting immediate results.
| You can enter a Java definition (variable, method, class, etc), like: int x = 8
| or a Java expression, like: x + x
| or a Java statement or import.
| These little chunks of Java code are called 'snippets'.
|
| There are also jshell commands that allow you to understand and
| control what you are doing, like: /list
|
| For a list of commands: /help
jshell> for (int i = 0; i < 4; i++) {
...> System.out.println(i);
...> }
0
1
2
3