read-eval-print loop (REPL) for several languages
I was wondering if there are some recommended read-eval-print loop (REPL) respectively for
(开发者_Go百科1) C++
(2) C
(3) Java
Thanks!
C and C++
You can use CERN's cint.
Java
You can use BeanShell, or if you don't care so much about having Java syntax (e.g. your goal is just to make sure the classes do what you want), you can use Groovy, Scala, JRuby, or Jython.
Those aren’t languages that support a dynamic eval
function.
There is also a Java REPL using the javax.tools.JavaCompiler interface here: http://www.scravy.de/blog/2012-02-27/a-read-eval-print-loop-for-java.htm (runs on the command line).
This seems to be avalaible in Java 9 coming september 22 of 2016.
http://openjdk.java.net/jeps/222
精彩评论