4 ms·
What compiled languages do you have in mind? I suppose technically there are repls for C or Rust or Java, but I wouldn't consider them ideal for interactive pro
by mrtranscendence 4y ago
What compiled languages do you have in mind? I suppose technically there are repls for C or Rust or Java, but I wouldn't consider them ideal for interactive programming. Functional programming might do a bit better -- Scala and GHCi work fine interactively. Does Go have a repl?
- pjmlp 4y agoJava, C#, F#, Lisp variants, and C++. Eclipse has Java scratchpads for ages, Groovy also works out for trying out ideas and nowadays we have jshell. F# has a REPL in ML linage, and nowadays C# also shares a REPL with it in Visual Studio. Lisp variants, going at it for 60 years. C++, there are hot reload environments, scripting variants, and even C and C++ debuggers can be quite interactive. I used GDB in 1996, alongside XEmacs, as poor man's REPL while creating a B+Tree library in C. Yes, there are Go interpreters available, https://github.com/traefik/yaegi https://github.com/traefik/yaegi
- cozzyd 4y agoParticle physicists have been using interpreted c++ for "macros" forever. First using the terrible hack of cint, now using cling which is quite good.
- pjmlp 4y agoIndeed, although I remember there used to be some commercial ones as well, from ads on The C/C++ Users' Journal and Dr. Dobbs.
- eatonphil 4y ago> compiled languages Might be tripping you up. Very few languages require that implementations be compiled or interpreted. For most languages, having a compiler or interpreter is an implementation decision. I can implement Python as an interpreter (CPython) or as a compiler (mypyc). I can implement Scheme as an interpreter (Chicken Scheme's csi) or as a compiler (Chicken Scheme's csc). The list goes on: Standard ML's Poly/ML implementation ships a compiler and an interpreter; OCaml ships a compiler and an interpreter. There are interpreted versions of Go like https://github.com/traefik/yaegi https://github.com/traefik/yaegi. And there are native-, AOT-compiled versions of Java like GraalVM's native-image. For most languages there need be no relationship at all between compiler vs interpreter, static vs dynamic, strict or no typing.