I want a programming language like this, and I can’t be the only one:
- It is completely unrelated to JavaScript in both syntax and semantics.
- It compiles cleanly down to JavaScript/asm.js and the resulting code runs perfectly in the browser as well as on Node.js.
- The compiler performs a continuation-passing–style transformation on its input source code, so that it can eliminate callbacks from JavaScript and make things appear to be blocking.
- Instead of handling long-running functions, network accesses (etc.) by passing callbacks, it emulates an Erlang-like shared-nothing concurrency model on top of JavaScript’s underlying single-threaded asynchronous programming model.
- It uses Web Workers for this when it’s practical, and the compiler can work out when it’s practical for itself.
- You can use native JavaScript functions and libraries from it by writing wrappers for them, but not directly. If the JavaScript library requires you to pass a callback, you use call/cc to wrap it to create the illusion that it blocks instead.
- The concurrency model is designed so that you’ll never have to deal with events firing in the middle of a blocking function.
- It has debugging tools that integrate with the browser, so you don’t have to plough through the (probably unreadable) compiled JavaScript code in the browser’s developer tools.
- It has a sensible module system and standard library. Only the bits of the standard library that you actually use are included in the compiled application. There’s no extra JS dependencies per se.
- I would like it to be a Lisp-based language, but that’s not strictly necessary.
- The compiler wouldn’t need to produce very fast code, either, but that’s never a bad thing.
- The language design is headed by an intelligent, open-minded, skeptical person, and the community around it is similarly free from hype and stupidity.