Error formatting macro: pagetree: java.lang.NullPointerException
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History


The current ClojureScript REPL is tied heavily to the use of Java's embedded Rhino. We lack the set of abstractions and tools that would allow us to:

  • plug any JavaScript VM in as the "E" in our REPL, the advantages of which include:
    • faster development on alternate JSVMs
    • ease of comparing how the same ClojureScript evaluates on multiple JSVMs
      • the potential to evaluate the same code on multiple JSVMs simultaneously for compatibility testing
    • protocolization of the evaluation component's communication model, allowing for either in-process or remote evaluators
  • support multiple user interfaces: IDE, CLI; the "R" and "P"
      • for network REPLs, build nrepl server on top of what we provide
      • for in-process REPLs, build CLI on top of what we provide

Research, ideas

  • Right now, the REPL:
    • sets up and tears down the evaluator (Rhino)
    • changes compiler state when it sees in-ns
    • knows the value of *cljs-ns* for printing in prompt
    • knows about load-file, which uses the compiler
    • has the responsibility of knowing about *cljs-verbose* and printing intermediate compilation information
  • Vision for REPL:
    • An API that supports the idea of a purely presentational REPL
    • input: form
    • output: value, <exceptions, errors, compiler state as relevant to presentation, warnings>