6 ms·
People love to go on and on about the power of macros, but for me, what separates Lisp from the crowd is that it's a compiled language with a REPL. Are they an
by jgalt212 13y ago
People love to go on and on about the power of macros, but for me, what separates Lisp from the crowd is that it's a compiled language with a REPL.
Are they any other usable compiled languages with a REPL?
- pjmlp 13y agoAny language can have a REPL, it is a plain implementation issue.
- lispm 13y agoIt's not. You will detect that in many cases it is a language issue, too. If you look at Lisp, you can see that the language definitions are optimized for interactive use and have a lot of facilities defined at the language level: incremental definitions, evaluation, effects of loading code, a robust interactive error system, ...
- pjmlp 13y agoHow come it is not? - Create an interpreter library for language X - Offer a GUI/CLI application using the said library Not all repls need to work at function level like LISP does.
- agoetz 13y agoFORTH comes to mind.
- 616c 13y agoCool. No idea FORTH had a REPL. Do you use FORTH or have cool project examples?
- wolfgke 13y agoFORTH had (and has) a REPL.
- pgeorgi 13y agoOpenFirmware, such as the various implementations on http://www.openbios.org/ http://www.openbios.org/ always comes with a Forth prompt. I was part of the team that wrote the original Open Source implementation (under GPL terms) named OpenBIOS. The project now also hosts all kinds of other implementations that were later published under BSD terms by their owners (and had 10+ years of market experience under their belt at that time). When FORTH started out, one of its differentiators was its live environment: you could test one step (part of an algorithm or similar) at the prompt, then define a "word" (= function) that implements it using the statements you tried, repeat until you finished your program using the words you defined earlier.
- agumonkey 13y agoThe only time you're happy to reboot a machine is when it has OpenFirmware Forth so you can play a bit with it.
- lbruder 13y agoForth not only has a REPL, but an incremental compiler, too. Have a look at http://www.forth.com/starting-forth/index.html http://www.forth.com/starting-forth/index.html, you'll be amazed what Forth has to offer! Interactive microcontroller debugging is every bit as fun as it sounds :)
- 13y ago
- 616c 13y agoDoes it matter if it is a bare-bone systems language with no GC or automated memory management? Erlang and Elixir, a new language for the Erlang VM with a different syntax, are compiled languages with REPLs. I also think about Scala and others for the JVM, but I have a feeling you do not think of those as examples because of the VM or the lack of native code compilation. I could be wrong.
- jules 13y agoHaskell, OCaml, Erlang, Scala, C#, C, C++ (!) and many others. This really doesn't set Lisp apart any more.
- 616c 13y agoWhat is this C++ REPL you speak of?
- kijiki 13y agoCINT: http://root.cern.ch/drupal/content/cint http://root.cern.ch/drupal/content/cint
- Create 13y agofirst the practicalities: CINT cannot and is unlikely to ever properly interpret ANSI/ISO C++. http://www.insectnation.org/howto/problems-with-root http://www.insectnation.org/howto/problems-with-root http://linuxfr.org/nodes/18919/comments/632920 http://linuxfr.org/nodes/18919/comments/632920 https://linuxfr.org/nodes/19928/comments/698692 https://linuxfr.org/nodes/19928/comments/698692
- nimrody 13y agoTry cling (http://root.cern.ch/drupal/content/cling http://root.cern.ch/drupal/content/cling) for just one example based on LLVM.
- _delirium 13y agoIf by Haskell's REPL you mean GHCi, I think it probably qualifies, but it lacks one of the nicer features of a REPL, which is that you can type the same code interactively that you can load from a file. In fact that's how SLIME works with Lisp, by literally copying forms from a Lisp file into the interactive session. If you copy/paste Haskell code out of your .hs files into GHCi you get errors, because the syntax is slightly different, which I find a bit confusing & inconvenient.
- 13y ago
- camperman 13y agoLuaJIT.
- RBerenguel 13y agoWell, I wouldn't say Forth is specially "usable," (I'm far from an expert, so this may be it) but it applies: compiled with a REPL.
- Turing_Machine 13y agoMost implementations of Javascript give you a REPL (assuming that JIT counts) in the sense that there's no hard distinction between code loaded from a file and code typed at the console prompt.
- bsilvereagle 13y agoJulia