altJS
altJS is a collection of languages and tools aimed at rebooting JavaScript and making it better. Everything you'll find on this page is designed to output code for use on the web or with JavaScript-enabled servers and devices. This site is a handy guide to what's new in the altJS universe, as well as a place to connect.
Missing the conversation? Chat on #altJS or join the .
Top-Ranking Languages on GitHub
(JavaScript #1, ActionScript #18)
CoffeeScript #10, HaXe #46, Objective-J #50
New Languages Based on JavaScript
These languages employ a combination of syntactic sugar and replacement syntax. They're new in the sense that they aren't ports, but don't necessarily reflect JavaScript's look-and-feel or default behavior. Some are backward-compatible supersets of JavaScript, others are not.
- CoffeeScript JavaScript alternative inspired by Ruby, Python and others.
- Coco A CoffeeScript variant with cutting-edge experimental features.
- Contracts.coffee CoffeeScript dialect with runtime contracts.
- Jack A language that emphasizes simplicity, fun and productivity.
- JS11 A code expander that inserts omitted elements and debugs line-for-line.
- Sibilant An expandable JavaScript-like language inspired by Lisp.
- Kaffeine Progressive enhancement of JavaScript, aimed at professionals.
- Move A simplified language intended for new programmers.
- Parsec CoffeeScript An extensible fork of the CoffeeScript project.
- Pseudocode-ish syntax alternative to the ECMAScript syntax.
- LiveScript Coco but much more compatible with CoffeeScript, more functional, and more feature rich.
JavaScript Enhancements
Security Enforcement
- ADsafe Client-side static verifier and API, making third party scripts safe.
- Compiles ES5/strict to ES3 and supports object-capabilities.
- Dojo Secure Framework for building secure mashups.
- Facebook JavaScript, used for scripting Facebook gadgets.
- Jacaranda Static verifier supporting object-capabilities.
- Gatekeeper Microsoft Research project.
- Microsoft Web Sandbox Technology preview, security through isolation.
Static Typing
- Some of the others listed are statically typed, such as mobl, GWT, NS Basic, and Haxe.
- SafeJS Typed JS with optional syntactic sugar.
- Script# [commercial] Compiles C# to JS.
- MileScript [commercial] A strongly-typed language similar to C# and Java, but which compiles to JS. free for non-profit, educational use.
- Mascara [commercial] Enhances JavaScript with powerful features like classes, namespaces and type-checking.
- Roy Functional language with type inference, structural typing, sum types, pattern matching - tries to stay close to JavaScript semantics
- Prefix C# like language with readable output.
- Elm type-safe functional language that compiles to HTML, CSS, and JavaScript
- Pit F# to Javascript compiler
- JSX a faster, safer, easier alternative to JavaScript
Synchronous to Asynchronous (CPS)
- Streamline.js Uses underscore (_) to stand for callbacks. This fork preserves line numbers for debugging.
- TameJS From OkCupid, a cleaner way to write async JavaScript.
- mobl Screen-driven language and toolset for building mobile web apps.
- StratifiedJS JavaScript plus structured concurrency.
- NarrativeJS JavaScript extension with asynchronous futures and promises.
- jwacs JavaScript With Advanced Continuation Support.
- Jscex Write simple JavaScript code, execute it asynchronously by compiling to monadic form. Works in any ECMAScript 3 engines directly.
Language Extensions
- ContextJS is an implementation of Context-oriented Programming for JavaScript.
- Cycript An Objective-C / JavaScript bridge that can also be used to compile and compress standard or hybrid JavaScript syntax.
- Objective-J Shares with JavaScript the same relationship that Objective-C has with the C programming language: that of being a strict, but small, superset.
- JS2 Object-oriented JavaScript with syntactic sugar (curry, foreach, property). Released as a Ruby gem.
- Jangaroo AS3 (ActionScript) to JavaScript.
- Flapjax Event-driven, reactive evaluation.
- Restrict Mode Tightens up the behavior of several JavaScript operators, including ==.
- JavaScript++ Superset of JS that includes features such as classes, block scoping and a pluggable type system.
Next-Generation JavaScript
These are implementations intended to test next-generation proposals for the ECMAScript standard. They represent semi-official efforts to improve the JavaScript platform.
-
Narcissus Mozilla's experimental JavaScript engine by Brendan Eich and others.
- Jasy: Python port of Narcissus with some enhancements
- Google's testbed platform for next-generation syntax ideas.
Ruby Ports
- HotRuby Runs opcode, compiled by YARV on Ruby inside a web browser or in Flash.
- rb2js Converts Ruby to JavaScript.
- Red Writes like Ruby and runs like JavaScript.
- Quby Used for game coding site, not open source (requires HTML5).
Python Ports
- PYXC-PJ Python to JS. Can generate a (line/col)-number mappings file.
- Pyjamas Python to JS.
- Skulpt Python. Client side.
- PyCow Python to MooTools JS.
- PyvaScript Python-like syntax to JavaScript.
Java Ports
- Google Web Toolkit, compiles java to JavaScript
- Java2Script Eclipse Java to JavaScript compiler plugin and JavaScript version of SWT.
- j2js Java bytecode to JavaScript.
- STJS (Strongly-Typed JavaScript) Maven plugin that generates JS from Java source.
- BicaVM A JVM in JavaScript
Lisp, Clojure & Scheme Ports
- Parenscript Subset of Common Lisp to JS.
- Moby Scheme A Scheme running in JS.
- scheme2js Scheme to JavaScript.
- ClojureScript From the official Clojure/core team. Converts a majority of Clojure to JS.
- ClojureScript Translates code written in a very small subset of Clojure.
- clojurejs Subset of Clojure to JS.
- Scriptjure Library for generating JavaScript from Clojure forms.
- edgelisp A Lisp for JavaScript.
- Ralph Lisp-1 dialect to JavaScript.
- Spock A Scheme to JavaScript compiler that uses Henry Baker's Cheney-on-the-MTA compilation strategy.
- Fargo Scheme in JavaScript.
- Outlet A language Lisp-like in nature.
OCaml/ML Ports
Haskell Ports
- UHC (Utrecht Haskell Compiler) backend converts UHC core to JavaScript, allowing the compiling of Haskell code to JS.
- YHC (York Haskell Compiler) backend, as above but with YHC core language.
- JSHC Haskell to JavaScript compiler in JavaScript.
- ghcjs Haskell to Javascript compiler (via GHC)
- Haste Generate lean Javascript code from Haskell
Smalltalk Derivatives
- Clamato a Smalltalk dialect that is designed to operate within the JavaScript runtime.
- Silver Smalltalk [commercial] Smalltalk in the browser.
- JTalk An implementation of the Smalltalk language that runs on top of the JavaScript runtime.
- Lively Kernel - smalltalk/squeak-like development environment in the browser.
C/C++ Ports
- LLVM to JavaScript compiler.
- mala vala (gobject) to JavaScript.
- Clue C language compiler to different runtimes (Lua, JS, Perl 5, C, Java, CL).
BASIC Ports
- NS Basic/App Studio [commercial] Visual Basic-style BASIC to JavaScript compiler. Includes IDE. Targets iOS and Android.
- qb.js An implementation of QBASIC in JavaScript.
Multitarget
- Haxe compiles to several platforms (C++, Flash, JS, Neko, PHP).
- Fantom Evolutionary object-oriented language emphasizing succinct and effective APIs (JVM, CLR, JS).
- Monkey [commercial] Massively multi platform language (HTML5, Native OpenGL/OpenAL (Windows + Mac), Android, Flash, iOS, XNA).
- Clue C language compiler to different runtimes (Lua, JS, Perl 5, C, Java, CL).
- jsc [experimental] Recompile your .NET assembly to JavaScript, ActionScript, PHP or Java.
- JSIL Compiles .NET bytecode (CIL) to JavaScript.
- IL2JS Generates JavaScript, CSS and HTML files from .NET DLL files
Tierless Languages (produce both client & server)
- Opa Industrial programming language for high-security distributed web applications.
- Fun A programming language for realtime webapps - compiles to client-side and server-side JS.
- Ur In the tradition of ML and Haskell.
- WebSharper Lets you compile F# to JS.
- mobl The new language for programming the mobile web.
- E Compiles E to JS. E is a secure distributed persistent pure object language.
- Sugar new programming language designed to replace JavaScript for client-side (and server-side) web development.
Other Projects
- Dart A class-based programming language for creating structured web applications.
- Oia A port of Io to JavaScript.
- newspeak in progress, converting compiler from Java to JavaScript.
- Quixe a Glulx VM interpreter written in JavaScript.
- Gnusto a Z-Machine VM interpreter written in JavaScript.
- Logo Interpreter
- TIScript
- tcl.js Tcl implementation in Javascript.
- MIPS.coffee Simple MIPS Interpretor
- erljs Run Erlang in JavaScript
- Nile Declarative Stream Processing for Media Applications (with JS backend)
Tools for Compiler Writers
JavaScript Parser Generators
- jison Bison in JavaScript, used by CoffeeScript
- OMeta/JS (source) metacompiler for many languages to many targets, including js.
- PEG.js parser generator for JavaScript based on the parsing expression grammar formalism
- Language.js PEG with error nodes being inserted into the tree for unique error handling
- Canopy Self-hosting PEG parser compiler for JavaScript, influenced by Ruby parser generators such as Treetop and Citrus. Depends on JS.Class library
- JS/CC LALR(1) parser generator
- jsparse
- ReParse parser combinator library for JavaScript like Haskell's Parsec
- p4js Monadic parser library for JavaScript
- JSGLR Scannerless, Generalized Left-to-right Rightmost (SGLR) derivation parser for JavaScript
- antlr has a JavaScript target
- LL(k) parser
Javascript AST (Abstract Syntax Tree)
- JS Shaper an extensible framework for JavaScript syntax tree shaping
- format used by the es5 parser
- treehugger JavaScript AST transformation tools
- ECMAScript 5 parser A parser for ES5, the current version of ECMAScript.
- Esprima ECMAScript parsing infrastructure for multipurpose analysis
- language-javascript JavaScript parser for Haskell.
Created with the help of this page (started by ) and the guys on #altJS, by